Class: Yummly::Flavor
- Inherits:
-
Object
- Object
- Yummly::Flavor
- Defined in:
- lib/yummly/flavor.rb
Overview
Contains the flavor scores for a recipe, each on a range from 0 to 1.
Instance Attribute Summary collapse
-
#bitterness ⇒ Object
Returns the value of attribute bitterness.
-
#saltiness ⇒ Object
Returns the value of attribute saltiness.
-
#savoriness ⇒ Object
Returns the value of attribute savoriness.
-
#sourness ⇒ Object
Returns the value of attribute sourness.
-
#spiciness ⇒ Object
Returns the value of attribute spiciness.
-
#sweetness ⇒ Object
Returns the value of attribute sweetness.
Instance Method Summary collapse
-
#initialize(values) ⇒ Flavor
constructor
A new instance of Flavor.
Constructor Details
#initialize(values) ⇒ Flavor
Returns a new instance of Flavor.
11 12 13 14 15 16 17 |
# File 'lib/yummly/flavor.rb', line 11 def initialize(values) @spiciness = values["spicy"] @bitterness = values["bitter"] @sweetness = values["sweet"] @savoriness = values["meaty"] @sourness = values["sour"] end |
Instance Attribute Details
#bitterness ⇒ Object
Returns the value of attribute bitterness.
4 5 6 |
# File 'lib/yummly/flavor.rb', line 4 def bitterness @bitterness end |
#saltiness ⇒ Object
Returns the value of attribute saltiness.
4 5 6 |
# File 'lib/yummly/flavor.rb', line 4 def saltiness @saltiness end |
#savoriness ⇒ Object
Returns the value of attribute savoriness.
4 5 6 |
# File 'lib/yummly/flavor.rb', line 4 def savoriness @savoriness end |
#sourness ⇒ Object
Returns the value of attribute sourness.
4 5 6 |
# File 'lib/yummly/flavor.rb', line 4 def sourness @sourness end |
#spiciness ⇒ Object
Returns the value of attribute spiciness.
4 5 6 |
# File 'lib/yummly/flavor.rb', line 4 def spiciness @spiciness end |
#sweetness ⇒ Object
Returns the value of attribute sweetness.
4 5 6 |
# File 'lib/yummly/flavor.rb', line 4 def sweetness @sweetness end |