Class: Boxify::Box
Instance Attribute Summary collapse
-
#total_count ⇒ Object
Returns the value of attribute total_count.
Attributes included from Dimensionable
Instance Method Summary collapse
-
#initialize(width:, depth:, height:, total_count: 1) ⇒ Box
constructor
A new instance of Box.
- #rotate ⇒ Object
- #rotated ⇒ Object
Methods included from Dimensionable
Constructor Details
#initialize(width:, depth:, height:, total_count: 1) ⇒ Box
Returns a new instance of Box.
7 8 9 10 11 12 |
# File 'lib/boxify/box.rb', line 7 def initialize(width:, depth:, height:, total_count: 1) @width = width @depth = depth @height = height @total_count = total_count end |
Instance Attribute Details
#total_count ⇒ Object
Returns the value of attribute total_count.
5 6 7 |
# File 'lib/boxify/box.rb', line 5 def total_count @total_count end |
Instance Method Details
#rotate ⇒ Object
18 19 20 21 22 |
# File 'lib/boxify/box.rb', line 18 def rotate temp_width = width @width = height @height = temp_width end |