Class: Yummly::Unit
- Inherits:
-
Object
- Object
- Yummly::Unit
- Defined in:
- lib/yummly/unit.rb
Instance Attribute Summary collapse
-
#abbreviation ⇒ Object
Single unit abbreviation for unit of measure.
-
#name ⇒ Object
Single unit display name for unit of measure.
-
#plural ⇒ Object
Plural display name for unit of measure.
-
#plural_abbreviation ⇒ Object
Plural unit abbreviation for unit of measure.
Instance Method Summary collapse
-
#initialize(values) ⇒ Unit
constructor
A new instance of Unit.
Constructor Details
#initialize(values) ⇒ Unit
Returns a new instance of Unit.
17 18 19 20 21 22 |
# File 'lib/yummly/unit.rb', line 17 def initialize(values) @name = values["name"] @abbreviation = values["abbreviation"] @plural = values["plural"] @plural_abbreviation = values["pluralAbbreviation"] end |
Instance Attribute Details
#abbreviation ⇒ Object
Single unit abbreviation for unit of measure.
9 10 11 |
# File 'lib/yummly/unit.rb', line 9 def abbreviation @abbreviation end |
#name ⇒ Object
Single unit display name for unit of measure.
6 7 8 |
# File 'lib/yummly/unit.rb', line 6 def name @name end |
#plural ⇒ Object
Plural display name for unit of measure.
12 13 14 |
# File 'lib/yummly/unit.rb', line 12 def plural @plural end |
#plural_abbreviation ⇒ Object
Plural unit abbreviation for unit of measure.
15 16 17 |
# File 'lib/yummly/unit.rb', line 15 def plural_abbreviation @plural_abbreviation end |