class REDCap::Form::RadioButtons

Public Instance Methods

options() click to toggle source
# File lib/red_cap/form/fields.rb, line 86
def options
  select_choices_or_calculations
    .split(/\s*\|\s*/)
    .reduce({}) do |options, pair|
      _, key, value = *pair.match(/\A(\d+),(.+)\z/)
      options.merge key => value
    end
end
value(responses) click to toggle source
Calls superclass method REDCap::Form::Field#value
# File lib/red_cap/form/fields.rb, line 82
def value responses
  options[super]
end