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

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



71
72
73
74
75
76
77
# File 'lib/red_cap/form/fields.rb', line 71

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