Class: OpenShip::Box

Inherits:
Object
  • Object
show all
Defined in:
lib/open-ship/sortr.rb

Direct Known Subclasses

Carton

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#height ⇒ Object

Returns the value of attribute height.



23
24
25
# File 'lib/open-ship/sortr.rb', line 23

def height
  @height
end

#label ⇒ Object

Returns the value of attribute label.



23
24
25
# File 'lib/open-ship/sortr.rb', line 23

def label
  @label
end

#length ⇒ Object

Returns the value of attribute length.



23
24
25
# File 'lib/open-ship/sortr.rb', line 23

def length
  @length
end

#product_quantity ⇒ Object

Returns the value of attribute product_quantity.



23
24
25
# File 'lib/open-ship/sortr.rb', line 23

def product_quantity
  @product_quantity
end

#weight ⇒ Object

Returns the value of attribute weight.



23
24
25
# File 'lib/open-ship/sortr.rb', line 23

def weight
  @weight
end

#width ⇒ Object

Returns the value of attribute width.



23
24
25
# File 'lib/open-ship/sortr.rb', line 23

def width
  @width
end

Instance Method Details

#volume ⇒ Object



25
26
27
# File 'lib/open-ship/sortr.rb', line 25

def volume
  (length * width * height)
end