Class: Percept::CheckboxField
- Inherits:
-
Object
- Object
- Percept::CheckboxField
- Defined in:
- lib/percept/checkbox_field.rb
Instance Attribute Summary collapse
-
#end_x ⇒ Object
Returns the value of attribute end_x.
-
#end_y ⇒ Object
Returns the value of attribute end_y.
-
#start_x ⇒ Object
Returns the value of attribute start_x.
-
#start_y ⇒ Object
Returns the value of attribute start_y.
Instance Method Summary collapse
- #height ⇒ Object
-
#initialize(params) ⇒ CheckboxField
constructor
A new instance of CheckboxField.
- #width ⇒ Object
Constructor Details
#initialize(params) ⇒ CheckboxField
Returns a new instance of CheckboxField.
7 8 9 10 11 12 |
# File 'lib/percept/checkbox_field.rb', line 7 def initialize(params) self.start_x = params.fetch(:start_x) self.start_y = params.fetch(:start_y) self.end_x = params.fetch(:end_x) self.end_y = params.fetch(:end_y) end |
Instance Attribute Details
#end_x ⇒ Object
Returns the value of attribute end_x.
5 6 7 |
# File 'lib/percept/checkbox_field.rb', line 5 def end_x @end_x end |
#end_y ⇒ Object
Returns the value of attribute end_y.
5 6 7 |
# File 'lib/percept/checkbox_field.rb', line 5 def end_y @end_y end |
#start_x ⇒ Object
Returns the value of attribute start_x.
5 6 7 |
# File 'lib/percept/checkbox_field.rb', line 5 def start_x @start_x end |
#start_y ⇒ Object
Returns the value of attribute start_y.
5 6 7 |
# File 'lib/percept/checkbox_field.rb', line 5 def start_y @start_y end |
Instance Method Details
#height ⇒ Object
18 19 20 |
# File 'lib/percept/checkbox_field.rb', line 18 def height end_y - start_y end |
#width ⇒ Object
14 15 16 |
# File 'lib/percept/checkbox_field.rb', line 14 def width end_x - start_x end |