Class: TwitterCldr::Resources::Units
- Inherits:
-
Object
- Object
- TwitterCldr::Resources::Units
- Defined in:
- lib/twitter_cldr/resources/units_importer.rb
Instance Attribute Summary collapse
-
#cldr_req ⇒ Object
readonly
Returns the value of attribute cldr_req.
-
#locale ⇒ Object
readonly
Returns the value of attribute locale.
Instance Method Summary collapse
-
#initialize(locale, cldr_req) ⇒ Units
constructor
A new instance of Units.
- #to_h ⇒ Object
Constructor Details
#initialize(locale, cldr_req) ⇒ Units
Returns a new instance of Units.
65 66 67 68 |
# File 'lib/twitter_cldr/resources/units_importer.rb', line 65 def initialize(locale, cldr_req) @locale = locale @cldr_req = cldr_req end |
Instance Attribute Details
#cldr_req ⇒ Object (readonly)
Returns the value of attribute cldr_req.
63 64 65 |
# File 'lib/twitter_cldr/resources/units_importer.rb', line 63 def cldr_req @cldr_req end |
#locale ⇒ Object (readonly)
Returns the value of attribute locale.
63 64 65 |
# File 'lib/twitter_cldr/resources/units_importer.rb', line 63 def locale @locale end |
Instance Method Details
#to_h ⇒ Object
70 71 72 73 74 75 76 77 |
# File 'lib/twitter_cldr/resources/units_importer.rb', line 70 def to_h { units: { unitLength: unit_length, durationUnit: duration_unit } } end |