Module: Oshpark::Dimensionable
- Included in:
- Project
- Defined in:
- lib/oshpark/dimensionable.rb
Instance Method Summary collapse
- #area_in_square_inches ⇒ Object
- #area_in_square_mm ⇒ Object
- #height_in_inches ⇒ Object
- #height_in_mm ⇒ Object
- #width_in_inches ⇒ Object
- #width_in_mm ⇒ Object
Instance Method Details
#area_in_square_inches ⇒ Object
11 12 13 |
# File 'lib/oshpark/dimensionable.rb', line 11 def area_in_square_inches width_in_inches * height_in_inches end |
#area_in_square_mm ⇒ Object
23 24 25 |
# File 'lib/oshpark/dimensionable.rb', line 23 def area_in_square_mm width_in_mm * height_in_mm end |
#height_in_inches ⇒ Object
7 8 9 |
# File 'lib/oshpark/dimensionable.rb', line 7 def height_in_inches height_in_mils / 1000.0 end |
#height_in_mm ⇒ Object
19 20 21 |
# File 'lib/oshpark/dimensionable.rb', line 19 def height_in_mm height_in_inches * 25.4 end |
#width_in_inches ⇒ Object
3 4 5 |
# File 'lib/oshpark/dimensionable.rb', line 3 def width_in_inches width_in_mils / 1000.0 end |
#width_in_mm ⇒ Object
15 16 17 |
# File 'lib/oshpark/dimensionable.rb', line 15 def width_in_mm width_in_inches * 25.4 end |