Class: Google4R::Checkout::Weight

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

Overview

This defines item weight

Constant Summary collapse

LB =

Constants for unit

'LB'

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 = LB) ⇒ Weight

Returns a new instance of Weight.



1116
1117
1118
1119
# File 'lib/google4r/checkout/shared.rb', line 1116

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