Class: REDCap::Form::Yesno

Inherits:
Field
  • Object
show all
Defined in:
lib/red_cap/form/fields.rb

Constant Summary

Constants inherited from Field

Field::KEYS

Instance Attribute Summary

Attributes inherited from Field

#associated_fields, #attributes, #options

Instance Method Summary collapse

Methods inherited from Field

#method_missing, #tags

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class REDCap::Form::Field

Instance Method Details

#value(responses) ⇒ Object



79
80
81
82
83
84
85
# File 'lib/red_cap/form/fields.rb', line 79

def value responses
  if options.has_key?(:default) && super == ""
    options[:default]
  else
    super == "1"
  end
end