class Boxify::Box
Attributes
total_count[RW]
Public Class Methods
new(width:, depth:, height:, total_count: 1)
click to toggle source
# 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
Public Instance Methods
rotate()
click to toggle source
# File lib/boxify/box.rb, line 18 def rotate temp_width = width @width = height @height = temp_width end
rotated()
click to toggle source
# File lib/boxify/box.rb, line 14 def rotated @rotated ||= Box.new(width: height, depth: depth, height: width) end