Class: Chop::Form::Radio
- Inherits:
-
Field
- Object
- Struct
- Field
- Chop::Form::Radio
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
candidates, combined_css_selector, css_selector, #diff_value, for, from, #label_text, #should_include_in_diff?, #to_diff_row
Instance Method Details
#fill_in! ⇒ Object
253
254
255
256
257
258
259
|
# File 'lib/chop/form.rb', line 253
def fill_in!
if nonstandard_labelling?
value_field.click
else
session.choose label
end
end
|
#get_value ⇒ Object
261
262
263
|
# File 'lib/chop/form.rb', line 261
def get_value
session.all("[name='#{field[:name]}']").find(&:checked?).try(:value)
end
|
#matches? ⇒ Boolean
249
250
251
|
# File 'lib/chop/form.rb', line 249
def matches?
field[:type] == "radio"
end
|