Class: Domino::Form::BooleanField

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

Instance Attribute Summary

Attributes inherited from Field

#callback, #locator, #name, #options

Instance Method Summary collapse

Methods inherited from Field

#extract_field_options, #field, #initialize, #value

Constructor Details

This class inherits a constructor from Domino::Form::Field

Instance Method Details

#read(node) ⇒ Object



2
3
4
# File 'lib/domino/form/boolean_field.rb', line 2

def read(node)
  node.find_field(locator, options).checked?
end

#write(node, value) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/domino/form/boolean_field.rb', line 6

def write(node, value)
  if value
    node.check(locator, options)
  else
    node.uncheck(locator, options)
  end
end