Sha256: 34dedcaa93d2925edf5dbcac326534c094b85efde0aa8a0308512e5af41ac9af
Contents?: true
Size: 588 Bytes
Versions: 3
Compression:
Stored size: 588 Bytes
Contents
module FoodInfo module Adapters class FatSecret module Data class FoodItem < Hashie::Trash property :servings property :id, :from => :food_id property :name, :from => :food_name property :kind, :from => :food_type property :url, :from => :food_url property :brand, :from => :brand_name def initialize(*args) super(*args) self[:servings] = self[:servings]['serving'].collect{|s| FoodServing.new(s) } end end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems