Class: Zutat::Ingredient
- Inherits:
-
Object
- Object
- Zutat::Ingredient
- Defined in:
- lib/zutat/ingredient.rb
Instance Attribute Summary collapse
-
#_id ⇒ Object
Returns the value of attribute _id.
-
#amount ⇒ Object
Returns the value of attribute amount.
-
#asin ⇒ Object
Returns the value of attribute asin.
-
#biotin ⇒ Object
Returns the value of attribute biotin.
-
#calcium ⇒ Object
Returns the value of attribute calcium.
-
#calories ⇒ Object
Returns the value of attribute calories.
-
#carbs ⇒ Object
Returns the value of attribute carbs.
-
#chloride ⇒ Object
Returns the value of attribute chloride.
-
#cholesterol ⇒ Object
Returns the value of attribute cholesterol.
-
#choline ⇒ Object
Returns the value of attribute choline.
-
#chromium ⇒ Object
Returns the value of attribute chromium.
-
#container_size ⇒ Object
Returns the value of attribute container_size.
-
#copper ⇒ Object
Returns the value of attribute copper.
-
#currency ⇒ Object
Returns the value of attribute currency.
-
#fat ⇒ Object
Returns the value of attribute fat.
-
#fiber ⇒ Object
Returns the value of attribute fiber.
-
#folate ⇒ Object
Returns the value of attribute folate.
-
#form ⇒ Object
Returns the value of attribute form.
-
#id ⇒ Object
Returns the value of attribute id.
-
#insoluble_fiber ⇒ Object
Returns the value of attribute insoluble_fiber.
-
#iodine ⇒ Object
Returns the value of attribute iodine.
-
#iron ⇒ Object
Returns the value of attribute iron.
-
#item_cost ⇒ Object
Returns the value of attribute item_cost.
-
#maganese ⇒ Object
Returns the value of attribute maganese.
-
#magnesium ⇒ Object
Returns the value of attribute magnesium.
-
#molybdenum ⇒ Object
Returns the value of attribute molybdenum.
-
#monounsaturated_fat ⇒ Object
Returns the value of attribute monounsaturated_fat.
-
#name ⇒ Object
Returns the value of attribute name.
-
#niacin ⇒ Object
Returns the value of attribute niacin.
-
#omega_3 ⇒ Object
Returns the value of attribute omega_3.
-
#omega_6 ⇒ Object
Returns the value of attribute omega_6.
-
#panthothenic ⇒ Object
Returns the value of attribute panthothenic.
-
#persistedAsin ⇒ Object
Returns the value of attribute persistedAsin.
-
#phosphorus ⇒ Object
Returns the value of attribute phosphorus.
-
#polyunsaturated_fat ⇒ Object
Returns the value of attribute polyunsaturated_fat.
-
#potassium ⇒ Object
Returns the value of attribute potassium.
-
#protein ⇒ Object
Returns the value of attribute protein.
-
#riboflavin ⇒ Object
Returns the value of attribute riboflavin.
-
#saturated_fat ⇒ Object
Returns the value of attribute saturated_fat.
-
#selinium ⇒ Object
Returns the value of attribute selinium.
-
#serving ⇒ Object
Returns the value of attribute serving.
-
#sodium ⇒ Object
Returns the value of attribute sodium.
-
#soluble_fiber ⇒ Object
Returns the value of attribute soluble_fiber.
-
#source ⇒ Object
Returns the value of attribute source.
-
#sulfur ⇒ Object
Returns the value of attribute sulfur.
-
#thiamin ⇒ Object
Returns the value of attribute thiamin.
-
#unit ⇒ Object
Returns the value of attribute unit.
-
#url ⇒ Object
Returns the value of attribute url.
-
#vitamin_a ⇒ Object
Returns the value of attribute vitamin_a.
-
#vitamin_b12 ⇒ Object
Returns the value of attribute vitamin_b12.
-
#vitamin_b6 ⇒ Object
Returns the value of attribute vitamin_b6.
-
#vitamin_c ⇒ Object
Returns the value of attribute vitamin_c.
-
#vitamin_d ⇒ Object
Returns the value of attribute vitamin_d.
-
#vitamin_e ⇒ Object
Returns the value of attribute vitamin_e.
-
#vitamin_k ⇒ Object
Returns the value of attribute vitamin_k.
-
#volumeStr ⇒ Object
Returns the value of attribute volumeStr.
-
#zinc ⇒ Object
Returns the value of attribute zinc.
Instance Method Summary collapse
-
#initialize(igrdnts) ⇒ Ingredient
constructor
A new instance of Ingredient.
Constructor Details
#initialize(igrdnts) ⇒ Ingredient
Returns a new instance of Ingredient.
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/zutat/ingredient.rb', line 11 def initialize(igrdnts) igrdnts.each do |k,v| m = k.gsub('-', '_') send("#{m}=",v) if m.is_a? String and m.is_empty? send("#{m}=",nil) end end end |
Instance Attribute Details
#_id ⇒ Object
Returns the value of attribute _id.
3 4 5 |
# File 'lib/zutat/ingredient.rb', line 3 def _id @_id end |
#amount ⇒ Object
Returns the value of attribute amount.
3 4 5 |
# File 'lib/zutat/ingredient.rb', line 3 def amount @amount end |
#asin ⇒ Object
Returns the value of attribute asin.
3 4 5 |
# File 'lib/zutat/ingredient.rb', line 3 def asin @asin end |
#biotin ⇒ Object
Returns the value of attribute biotin.
3 4 5 |
# File 'lib/zutat/ingredient.rb', line 3 def biotin @biotin end |
#calcium ⇒ Object
Returns the value of attribute calcium.
3 4 5 |
# File 'lib/zutat/ingredient.rb', line 3 def calcium @calcium end |
#calories ⇒ Object
Returns the value of attribute calories.
3 4 5 |
# File 'lib/zutat/ingredient.rb', line 3 def calories @calories end |
#carbs ⇒ Object
Returns the value of attribute carbs.
3 4 5 |
# File 'lib/zutat/ingredient.rb', line 3 def carbs @carbs end |
#chloride ⇒ Object
Returns the value of attribute chloride.
3 4 5 |
# File 'lib/zutat/ingredient.rb', line 3 def chloride @chloride end |
#cholesterol ⇒ Object
Returns the value of attribute cholesterol.
3 4 5 |
# File 'lib/zutat/ingredient.rb', line 3 def cholesterol @cholesterol end |
#choline ⇒ Object
Returns the value of attribute choline.
3 4 5 |
# File 'lib/zutat/ingredient.rb', line 3 def choline @choline end |
#chromium ⇒ Object
Returns the value of attribute chromium.
3 4 5 |
# File 'lib/zutat/ingredient.rb', line 3 def chromium @chromium end |
#container_size ⇒ Object
Returns the value of attribute container_size.
3 4 5 |
# File 'lib/zutat/ingredient.rb', line 3 def container_size @container_size end |
#copper ⇒ Object
Returns the value of attribute copper.
3 4 5 |
# File 'lib/zutat/ingredient.rb', line 3 def copper @copper end |
#currency ⇒ Object
Returns the value of attribute currency.
3 4 5 |
# File 'lib/zutat/ingredient.rb', line 3 def currency @currency end |
#fat ⇒ Object
Returns the value of attribute fat.
3 4 5 |
# File 'lib/zutat/ingredient.rb', line 3 def fat @fat end |
#fiber ⇒ Object
Returns the value of attribute fiber.
3 4 5 |
# File 'lib/zutat/ingredient.rb', line 3 def fiber @fiber end |
#folate ⇒ Object
Returns the value of attribute folate.
3 4 5 |
# File 'lib/zutat/ingredient.rb', line 3 def folate @folate end |
#form ⇒ Object
Returns the value of attribute form.
3 4 5 |
# File 'lib/zutat/ingredient.rb', line 3 def form @form end |
#id ⇒ Object
Returns the value of attribute id.
3 4 5 |
# File 'lib/zutat/ingredient.rb', line 3 def id @id end |
#insoluble_fiber ⇒ Object
Returns the value of attribute insoluble_fiber.
3 4 5 |
# File 'lib/zutat/ingredient.rb', line 3 def insoluble_fiber @insoluble_fiber end |
#iodine ⇒ Object
Returns the value of attribute iodine.
3 4 5 |
# File 'lib/zutat/ingredient.rb', line 3 def iodine @iodine end |
#iron ⇒ Object
Returns the value of attribute iron.
3 4 5 |
# File 'lib/zutat/ingredient.rb', line 3 def iron @iron end |
#item_cost ⇒ Object
Returns the value of attribute item_cost.
3 4 5 |
# File 'lib/zutat/ingredient.rb', line 3 def item_cost @item_cost end |
#maganese ⇒ Object
Returns the value of attribute maganese.
3 4 5 |
# File 'lib/zutat/ingredient.rb', line 3 def maganese @maganese end |
#magnesium ⇒ Object
Returns the value of attribute magnesium.
3 4 5 |
# File 'lib/zutat/ingredient.rb', line 3 def magnesium @magnesium end |
#molybdenum ⇒ Object
Returns the value of attribute molybdenum.
3 4 5 |
# File 'lib/zutat/ingredient.rb', line 3 def molybdenum @molybdenum end |
#monounsaturated_fat ⇒ Object
Returns the value of attribute monounsaturated_fat.
3 4 5 |
# File 'lib/zutat/ingredient.rb', line 3 def monounsaturated_fat @monounsaturated_fat end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/zutat/ingredient.rb', line 3 def name @name end |
#niacin ⇒ Object
Returns the value of attribute niacin.
3 4 5 |
# File 'lib/zutat/ingredient.rb', line 3 def niacin @niacin end |
#omega_3 ⇒ Object
Returns the value of attribute omega_3.
3 4 5 |
# File 'lib/zutat/ingredient.rb', line 3 def omega_3 @omega_3 end |
#omega_6 ⇒ Object
Returns the value of attribute omega_6.
3 4 5 |
# File 'lib/zutat/ingredient.rb', line 3 def omega_6 @omega_6 end |
#panthothenic ⇒ Object
Returns the value of attribute panthothenic.
3 4 5 |
# File 'lib/zutat/ingredient.rb', line 3 def panthothenic @panthothenic end |
#persistedAsin ⇒ Object
Returns the value of attribute persistedAsin.
3 4 5 |
# File 'lib/zutat/ingredient.rb', line 3 def persistedAsin @persistedAsin end |
#phosphorus ⇒ Object
Returns the value of attribute phosphorus.
3 4 5 |
# File 'lib/zutat/ingredient.rb', line 3 def phosphorus @phosphorus end |
#polyunsaturated_fat ⇒ Object
Returns the value of attribute polyunsaturated_fat.
3 4 5 |
# File 'lib/zutat/ingredient.rb', line 3 def polyunsaturated_fat @polyunsaturated_fat end |
#potassium ⇒ Object
Returns the value of attribute potassium.
3 4 5 |
# File 'lib/zutat/ingredient.rb', line 3 def potassium @potassium end |
#protein ⇒ Object
Returns the value of attribute protein.
3 4 5 |
# File 'lib/zutat/ingredient.rb', line 3 def protein @protein end |
#riboflavin ⇒ Object
Returns the value of attribute riboflavin.
3 4 5 |
# File 'lib/zutat/ingredient.rb', line 3 def riboflavin @riboflavin end |
#saturated_fat ⇒ Object
Returns the value of attribute saturated_fat.
3 4 5 |
# File 'lib/zutat/ingredient.rb', line 3 def saturated_fat @saturated_fat end |
#selinium ⇒ Object
Returns the value of attribute selinium.
3 4 5 |
# File 'lib/zutat/ingredient.rb', line 3 def selinium @selinium end |
#serving ⇒ Object
Returns the value of attribute serving.
3 4 5 |
# File 'lib/zutat/ingredient.rb', line 3 def serving @serving end |
#sodium ⇒ Object
Returns the value of attribute sodium.
3 4 5 |
# File 'lib/zutat/ingredient.rb', line 3 def sodium @sodium end |
#soluble_fiber ⇒ Object
Returns the value of attribute soluble_fiber.
3 4 5 |
# File 'lib/zutat/ingredient.rb', line 3 def soluble_fiber @soluble_fiber end |
#source ⇒ Object
Returns the value of attribute source.
3 4 5 |
# File 'lib/zutat/ingredient.rb', line 3 def source @source end |
#sulfur ⇒ Object
Returns the value of attribute sulfur.
3 4 5 |
# File 'lib/zutat/ingredient.rb', line 3 def sulfur @sulfur end |
#thiamin ⇒ Object
Returns the value of attribute thiamin.
3 4 5 |
# File 'lib/zutat/ingredient.rb', line 3 def thiamin @thiamin end |
#unit ⇒ Object
Returns the value of attribute unit.
3 4 5 |
# File 'lib/zutat/ingredient.rb', line 3 def unit @unit end |
#url ⇒ Object
Returns the value of attribute url.
3 4 5 |
# File 'lib/zutat/ingredient.rb', line 3 def url @url end |
#vitamin_a ⇒ Object
Returns the value of attribute vitamin_a.
3 4 5 |
# File 'lib/zutat/ingredient.rb', line 3 def vitamin_a @vitamin_a end |
#vitamin_b12 ⇒ Object
Returns the value of attribute vitamin_b12.
3 4 5 |
# File 'lib/zutat/ingredient.rb', line 3 def vitamin_b12 @vitamin_b12 end |
#vitamin_b6 ⇒ Object
Returns the value of attribute vitamin_b6.
3 4 5 |
# File 'lib/zutat/ingredient.rb', line 3 def vitamin_b6 @vitamin_b6 end |
#vitamin_c ⇒ Object
Returns the value of attribute vitamin_c.
3 4 5 |
# File 'lib/zutat/ingredient.rb', line 3 def vitamin_c @vitamin_c end |
#vitamin_d ⇒ Object
Returns the value of attribute vitamin_d.
3 4 5 |
# File 'lib/zutat/ingredient.rb', line 3 def vitamin_d @vitamin_d end |
#vitamin_e ⇒ Object
Returns the value of attribute vitamin_e.
3 4 5 |
# File 'lib/zutat/ingredient.rb', line 3 def vitamin_e @vitamin_e end |
#vitamin_k ⇒ Object
Returns the value of attribute vitamin_k.
3 4 5 |
# File 'lib/zutat/ingredient.rb', line 3 def vitamin_k @vitamin_k end |
#volumeStr ⇒ Object
Returns the value of attribute volumeStr.
3 4 5 |
# File 'lib/zutat/ingredient.rb', line 3 def volumeStr @volumeStr end |
#zinc ⇒ Object
Returns the value of attribute zinc.
3 4 5 |
# File 'lib/zutat/ingredient.rb', line 3 def zinc @zinc end |