module Boxify::Dimensionable
Attributes
depth[RW]
height[RW]
width[RW]
Public Instance Methods
area()
click to toggle source
# File lib/boxify/dimensionable.rb, line 5 def area width * depth end
surface_area()
click to toggle source
# File lib/boxify/dimensionable.rb, line 13 def surface_area (2 * height * width) + (2 * height * depth) + (2 * width * depth) end
volume()
click to toggle source
# File lib/boxify/dimensionable.rb, line 9 def volume width * height * depth end