Class: Dill::FieldGroup::CheckBox
- Defined in:
- lib/dill/field_group.rb
Overview
A check box.
Instance Attribute Summary
Attributes inherited from Widget
Instance Method Summary collapse
-
#get ⇒ Boolean
trueif the checkbox is checked,falseotherwise. -
#set(value) ⇒ Object
Checks or unchecks the current checkbox.
- #to_s ⇒ Object
Methods inherited from Field
Methods inherited from Widget
#!=, #!~, #<, #<=, #==, #=~, #>, #>=, action, #click, #diff, find_in, #has_action?, #initialize, #inspect, #match, present_in?, #reload, root, selector, #text, #to_cell, #to_f, #to_i, widget, widget_delegator
Methods included from WidgetContainer
Constructor Details
This class inherits a constructor from Dill::Widget
Instance Method Details
#get ⇒ Boolean
Returns true if the checkbox is checked, false otherwise.
281 282 283 |
# File 'lib/dill/field_group.rb', line 281 def get !! root.checked? end |
#set(value) ⇒ Object
Checks or unchecks the current checkbox.
277 |
# File 'lib/dill/field_group.rb', line 277 def_delegator :root, :set |
#to_s ⇒ Object
286 287 288 |
# File 'lib/dill/field_group.rb', line 286 def to_s get ? 'yes' : 'no' end |