Class: GOBL::Org::Unit
Overview
Unit describes how the quantity of the product should be interpreted.
Constant Summary collapse
- SCHEMA_ID =
The Schema ID of the GOBL Unit structure
'https://gobl.org/draft-0/org/unit'
- ENUM =
The enumeration of values of the object and their descriptions (Values different to these are also allowed)
{ 'g' => 'Metric grams', 'kg' => 'Metric kilograms', 't' => 'Metric tons', 'mm' => 'Milimetres', 'cm' => 'Centimetres', 'm' => 'Metres', 'km' => 'Kilometers', 'in' => 'Inches', 'ft' => 'Feet', 'm2' => 'Square metres', 'm3' => 'Cubic metres', 'cl' => 'Centilitres', 'l' => 'Litres', 'w' => 'Watts', 'kw' => 'Kilowatts', 'kwh' => 'Kilowatt Hours', 'day' => 'Days', 's' => 'Seconds', 'h' => 'Hours', 'min' => 'Minutes', 'piece' => 'Pieces', 'bag' => 'Bags', 'box' => 'Boxes', 'bin' => 'Bins', 'can' => 'Cans', 'tub' => 'Tubs', 'case' => 'Cases', 'tray' => 'Trays', 'portion' => 'Portions', 'dozen' => 'Dozens', 'roll' => 'Rolls', 'carton' => 'Cartons', 'cylinder' => 'Cylinders', 'barrel' => 'Barrels', 'jerrican' => 'Jerricans', 'carboy' => 'Carboys', 'demijohn' => 'Demijohn', 'bottle' => 'Bottles', '6pack' => 'Six Packs', 'canister' => 'Canisters', 'pkg' => 'Packages', 'bunch' => 'Bunches', 'tetrabrik' => 'Tetra-Briks', 'pallet' => 'Pallets', 'reel' => 'Reels', 'sack' => 'Sacks', 'sheet' => 'Sheets', 'envelope' => 'Envelopes' }.freeze
Method Summary
Methods inherited from Enum
all, #description, find_by_inquirer, find_by_sym, #initialize, #method_missing, #respond_to_missing?
Methods inherited from Value
#==, #as_json, #eql?, #hash, #initialize, #to_s, #to_sym
Methods inherited from Struct
#as_json, from_data, from_json!, #to_json
Constructor Details
This class inherits a constructor from GOBL::Enum
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class GOBL::Enum