lib/yummly/flavor.rb in yummly-0.0.3 vs lib/yummly/flavor.rb in yummly-0.0.4
- old
+ new
@@ -1,20 +1,22 @@
# Contains the flavor scores for a recipe, each on a range from 0 to 1.
-class Yummly::Flavor
+module Yummly
+ class Flavor
- attr_accessor :spiciness,
- :bitterness,
- :sweetness,
- :savoriness,
- :saltiness,
- :sourness
+ attr_accessor :spiciness,
+ :bitterness,
+ :sweetness,
+ :savoriness,
+ :saltiness,
+ :sourness
- def initialize(values)
- @spiciness = values["Piquant"]
- @bitterness = values["Bitter"]
- @sweetness = values["Sweet"]
- @savoriness = values["Meaty"]
- @sourness = values["Sour"]
- @saltiness = values["Salty"]
- end
+ def initialize(values)
+ @spiciness = values["Piquant"]
+ @bitterness = values["Bitter"]
+ @sweetness = values["Sweet"]
+ @savoriness = values["Meaty"]
+ @sourness = values["Sour"]
+ @saltiness = values["Salty"]
+ end
+ end
end
\ No newline at end of file