Class: Chop::Form::Radio

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

Instance Attribute Summary

Attributes inherited from Field

#field, #label, #path, #session, #value

Instance Method Summary collapse

Methods inherited from Field

for

Instance Method Details

#fill_in!Object



99
100
101
102
103
104
105
# File 'lib/chop/form.rb', line 99

def fill_in!
  if nonstandard_labelling?
    session.choose value
  else
    session.choose label
  end
end

#matches?Boolean

Returns:

  • (Boolean)


95
96
97
# File 'lib/chop/form.rb', line 95

def matches?
  field[:type] == "radio"
end