Class: BinPacking::FreeSpaceBox
- Inherits:
-
Object
- Object
- BinPacking::FreeSpaceBox
- Defined in:
- lib/bin_packing/free_space_box.rb
Instance Attribute Summary collapse
-
#height ⇒ Object
Returns the value of attribute height.
-
#width ⇒ Object
Returns the value of attribute width.
-
#x ⇒ Object
Returns the value of attribute x.
-
#y ⇒ Object
Returns the value of attribute y.
Instance Method Summary collapse
-
#initialize(width, height) ⇒ FreeSpaceBox
constructor
A new instance of FreeSpaceBox.
Constructor Details
#initialize(width, height) ⇒ FreeSpaceBox
Returns a new instance of FreeSpaceBox.
5 6 7 8 9 10 |
# File 'lib/bin_packing/free_space_box.rb', line 5 def initialize(width, height) @width = width @height = height @x = 0 @y = 0 end |
Instance Attribute Details
#height ⇒ Object
Returns the value of attribute height.
3 4 5 |
# File 'lib/bin_packing/free_space_box.rb', line 3 def height @height end |
#width ⇒ Object
Returns the value of attribute width.
3 4 5 |
# File 'lib/bin_packing/free_space_box.rb', line 3 def width @width end |
#x ⇒ Object
Returns the value of attribute x.
3 4 5 |
# File 'lib/bin_packing/free_space_box.rb', line 3 def x @x end |
#y ⇒ Object
Returns the value of attribute y.
3 4 5 |
# File 'lib/bin_packing/free_space_box.rb', line 3 def y @y end |