Class: UspsApi::WeightUom
- Inherits:
-
Object
- Object
- UspsApi::WeightUom
- Defined in:
- lib/usps_api/models/weight_uom.rb
Overview
Weight Unit of Measure * lb - Pounds
Constant Summary collapse
- WEIGHT_UOM =
[ # TODO: Write general description for LB LB = 'lb'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = LB) ⇒ Object
20 21 22 23 24 |
# File 'lib/usps_api/models/weight_uom.rb', line 20 def self.from_value(value, default_value = LB) return default_value if value.nil? default_value end |
.validate(value) ⇒ Object
14 15 16 17 18 |
# File 'lib/usps_api/models/weight_uom.rb', line 14 def self.validate(value) return false if value.nil? WEIGHT_UOM.include?(value) end |