Class: DotGrid::BoundingBox
- Inherits:
-
Object
- Object
- DotGrid::BoundingBox
- Defined in:
- lib/dot_grid/bounding_box.rb
Instance Attribute Summary collapse
-
#height ⇒ Object
Returns the value of attribute height.
-
#upper_left ⇒ Object
Returns the value of attribute upper_left.
-
#width ⇒ Object
Returns the value of attribute width.
Instance Method Summary collapse
-
#initialize(params) ⇒ BoundingBox
constructor
A new instance of BoundingBox.
Constructor Details
#initialize(params) ⇒ BoundingBox
Returns a new instance of BoundingBox.
9 10 11 12 13 |
# File 'lib/dot_grid/bounding_box.rb', line 9 def initialize(params) @upper_left = params[:upper_left] @width = params[:width] @height = params[:height] end |
Instance Attribute Details
#height ⇒ Object
Returns the value of attribute height.
3 4 5 |
# File 'lib/dot_grid/bounding_box.rb', line 3 def height @height end |
#upper_left ⇒ Object
Returns the value of attribute upper_left.
3 4 5 |
# File 'lib/dot_grid/bounding_box.rb', line 3 def upper_left @upper_left end |
#width ⇒ Object
Returns the value of attribute width.
3 4 5 |
# File 'lib/dot_grid/bounding_box.rb', line 3 def width @width end |