Class: Yummly::Flavor

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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

#bitternessObject

Returns the value of attribute bitterness.



4
5
6
# File 'lib/yummly/flavor.rb', line 4

def bitterness
  @bitterness
end

#saltinessObject

Returns the value of attribute saltiness.



4
5
6
# File 'lib/yummly/flavor.rb', line 4

def saltiness
  @saltiness
end

#savorinessObject

Returns the value of attribute savoriness.



4
5
6
# File 'lib/yummly/flavor.rb', line 4

def savoriness
  @savoriness
end

#sournessObject

Returns the value of attribute sourness.



4
5
6
# File 'lib/yummly/flavor.rb', line 4

def sourness
  @sourness
end

#spicinessObject

Returns the value of attribute spiciness.



4
5
6
# File 'lib/yummly/flavor.rb', line 4

def spiciness
  @spiciness
end

#sweetnessObject

Returns the value of attribute sweetness.



4
5
6
# File 'lib/yummly/flavor.rb', line 4

def sweetness
  @sweetness
end