Class: REDCap::Form::RadioButtons
- Defined in:
- lib/red_cap/form/fields.rb
Direct Known Subclasses
Constant Summary
Constants inherited from Field
Instance Attribute Summary
Attributes inherited from Field
#attributes, #form, #responses
Instance Method Summary collapse
Methods inherited from Field
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class REDCap::Form::Field
Instance Method Details
#options ⇒ Object
78 79 80 81 82 83 84 85 |
# File 'lib/red_cap/form/fields.rb', line 78 def select_choices_or_calculations .split(/\s*\|\s*/) .reduce({}) do |, pair| _, key, value = *pair.match(/\A(\d+),(.+)\z/) .merge key => value end end |
#value ⇒ Object
74 75 76 |
# File 'lib/red_cap/form/fields.rb', line 74 def value [responses[field_name]] end |