Sha256: 1ebd923400a48027e18b1bb87840af9983e5a1bb845362827ddd20679b60e8e2

Contents?: true

Size: 885 Bytes

Versions: 10

Compression:

Stored size: 885 Bytes

Contents

# The nutritional composition of the recipe, in the form of a list of nutrients and their amounts, per serving. Yummly
# will return nutrition estimates only for those recipes where we are reasonably confident in their accuracy. These are
# only estimates and you should be clear about that in what you tell your users.
module Yummly
  class NutritionEstimate

    # Nutrition attribute’s search parameter name.
    attr_accessor :attribute

    # Display name of this nutrition attribute.
    attr_accessor :description

    # Nutrition attribute value for this recipe.
    attr_accessor :value

    # Implied unit of measure as a Yummly::Unit object.
    attr_accessor :unit

    def initialize(values)
      @attribute = values["attribute"]
      @description = values["description"]
      @value = values["value"]
      @unit = Yummly::Unit.new(values["unit"])
    end

  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
yummly-0.0.13 lib/yummly/nutrition_estimate.rb
yummly-0.0.12 lib/yummly/nutrition_estimate.rb
yummly-0.0.11 lib/yummly/nutrition_estimate.rb
yummly-0.0.10 lib/yummly/nutrition_estimate.rb
yummly-0.0.9 lib/yummly/nutrition_estimate.rb
yummly-0.0.8 lib/yummly/nutrition_estimate.rb
yummly-0.0.7 lib/yummly/nutrition_estimate.rb
yummly-0.0.6 lib/yummly/nutrition_estimate.rb
yummly-0.0.5 lib/yummly/nutrition_estimate.rb
yummly-0.0.4 lib/yummly/nutrition_estimate.rb