Class: DotGrid::BoundingBox

Inherits:
Object
  • Object
show all
Defined in:
lib/dot_grid/bounding_box.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#heightObject

Returns the value of attribute height.



3
4
5
# File 'lib/dot_grid/bounding_box.rb', line 3

def height
  @height
end

#upper_leftObject

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

#widthObject

Returns the value of attribute width.



3
4
5
# File 'lib/dot_grid/bounding_box.rb', line 3

def width
  @width
end