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.



1125
1126
1127
1128
# File 'lib/google4r/checkout/shared.rb', line 1125

def initialize(value, unit=INCH)
  @unit = unit
  @value = BigDecimal.new(value.to_s)
end