Class: Google4R::Checkout::Dimension

Inherits:
Unit
  • Object
show all
Defined in:
lib/google4r/checkout/shared.rb

Overview

This defines package dimension

Constant Summary collapse

INCH =

Constants for unit

'IN'

Instance Attribute Summary

Attributes inherited from Unit

#unit, #value

Instance Method Summary collapse

Methods inherited from Unit

create_from_element

Constructor Details

#initialize(value, unit = INCH) ⇒ Dimension

Returns a new instance of Dimension.



1105
1106
1107
1108
# File 'lib/google4r/checkout/shared.rb', line 1105

def initialize(value, unit=INCH)
  @unit = unit
  @value = value.to_f
end