Class: REDCap::Form::CheckboxesWithCheckboxesOrOther
- Inherits:
-
CheckboxesWithOther
- Object
- Struct
- Field
- RadioButtons
- Checkboxes
- CheckboxesWithOther
- REDCap::Form::CheckboxesWithCheckboxesOrOther
- Defined in:
- lib/red_cap/form/fields.rb
Constant Summary
Constants inherited from Field
Instance Attribute Summary
Attributes inherited from Field
#attributes, #form, #responses
Instance Method Summary collapse
Methods inherited from CheckboxesWithOther
Methods inherited from RadioButtons
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
#value ⇒ Object
141 142 143 144 145 146 147 148 149 150 151 152 153 |
# File 'lib/red_cap/form/fields.rb', line 141 def value left = .values right = .keys.map do |key| checkbox_fields_for(key).map(&:value) end if .keys.include?("501") right[-1] = [other_text_field&.value] end Hash[left.zip(right)] end |