Class: Zutat::Ingredient

Inherits:
Object
  • Object
show all
Defined in:
lib/zutat/ingredient.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#_idObject

Returns the value of attribute _id.



3
4
5
# File 'lib/zutat/ingredient.rb', line 3

def _id
  @_id
end

#amountObject

Returns the value of attribute amount.



3
4
5
# File 'lib/zutat/ingredient.rb', line 3

def amount
  @amount
end

#asinObject

Returns the value of attribute asin.



3
4
5
# File 'lib/zutat/ingredient.rb', line 3

def asin
  @asin
end

#biotinObject

Returns the value of attribute biotin.



3
4
5
# File 'lib/zutat/ingredient.rb', line 3

def biotin
  @biotin
end

#calciumObject

Returns the value of attribute calcium.



3
4
5
# File 'lib/zutat/ingredient.rb', line 3

def calcium
  @calcium
end

#caloriesObject

Returns the value of attribute calories.



3
4
5
# File 'lib/zutat/ingredient.rb', line 3

def calories
  @calories
end

#carbsObject

Returns the value of attribute carbs.



3
4
5
# File 'lib/zutat/ingredient.rb', line 3

def carbs
  @carbs
end

#chlorideObject

Returns the value of attribute chloride.



3
4
5
# File 'lib/zutat/ingredient.rb', line 3

def chloride
  @chloride
end

#cholesterolObject

Returns the value of attribute cholesterol.



3
4
5
# File 'lib/zutat/ingredient.rb', line 3

def cholesterol
  @cholesterol
end

#cholineObject

Returns the value of attribute choline.



3
4
5
# File 'lib/zutat/ingredient.rb', line 3

def choline
  @choline
end

#chromiumObject

Returns the value of attribute chromium.



3
4
5
# File 'lib/zutat/ingredient.rb', line 3

def chromium
  @chromium
end

#container_sizeObject

Returns the value of attribute container_size.



3
4
5
# File 'lib/zutat/ingredient.rb', line 3

def container_size
  @container_size
end

#copperObject

Returns the value of attribute copper.



3
4
5
# File 'lib/zutat/ingredient.rb', line 3

def copper
  @copper
end

#currencyObject

Returns the value of attribute currency.



3
4
5
# File 'lib/zutat/ingredient.rb', line 3

def currency
  @currency
end

#fatObject

Returns the value of attribute fat.



3
4
5
# File 'lib/zutat/ingredient.rb', line 3

def fat
  @fat
end

#fiberObject

Returns the value of attribute fiber.



3
4
5
# File 'lib/zutat/ingredient.rb', line 3

def fiber
  @fiber
end

#folateObject

Returns the value of attribute folate.



3
4
5
# File 'lib/zutat/ingredient.rb', line 3

def folate
  @folate
end

#formObject

Returns the value of attribute form.



3
4
5
# File 'lib/zutat/ingredient.rb', line 3

def form
  @form
end

#idObject

Returns the value of attribute id.



3
4
5
# File 'lib/zutat/ingredient.rb', line 3

def id
  @id
end

#insoluble_fiberObject

Returns the value of attribute insoluble_fiber.



3
4
5
# File 'lib/zutat/ingredient.rb', line 3

def insoluble_fiber
  @insoluble_fiber
end

#iodineObject

Returns the value of attribute iodine.



3
4
5
# File 'lib/zutat/ingredient.rb', line 3

def iodine
  @iodine
end

#ironObject

Returns the value of attribute iron.



3
4
5
# File 'lib/zutat/ingredient.rb', line 3

def iron
  @iron
end

#item_costObject

Returns the value of attribute item_cost.



3
4
5
# File 'lib/zutat/ingredient.rb', line 3

def item_cost
  @item_cost
end

#maganeseObject

Returns the value of attribute maganese.



3
4
5
# File 'lib/zutat/ingredient.rb', line 3

def maganese
  @maganese
end

#magnesiumObject

Returns the value of attribute magnesium.



3
4
5
# File 'lib/zutat/ingredient.rb', line 3

def magnesium
  @magnesium
end

#molybdenumObject

Returns the value of attribute molybdenum.



3
4
5
# File 'lib/zutat/ingredient.rb', line 3

def molybdenum
  @molybdenum
end

#monounsaturated_fatObject

Returns the value of attribute monounsaturated_fat.



3
4
5
# File 'lib/zutat/ingredient.rb', line 3

def monounsaturated_fat
  @monounsaturated_fat
end

#nameObject

Returns the value of attribute name.



3
4
5
# File 'lib/zutat/ingredient.rb', line 3

def name
  @name
end

#niacinObject

Returns the value of attribute niacin.



3
4
5
# File 'lib/zutat/ingredient.rb', line 3

def niacin
  @niacin
end

#omega_3Object

Returns the value of attribute omega_3.



3
4
5
# File 'lib/zutat/ingredient.rb', line 3

def omega_3
  @omega_3
end

#omega_6Object

Returns the value of attribute omega_6.



3
4
5
# File 'lib/zutat/ingredient.rb', line 3

def omega_6
  @omega_6
end

#panthothenicObject

Returns the value of attribute panthothenic.



3
4
5
# File 'lib/zutat/ingredient.rb', line 3

def panthothenic
  @panthothenic
end

#persistedAsinObject

Returns the value of attribute persistedAsin.



3
4
5
# File 'lib/zutat/ingredient.rb', line 3

def persistedAsin
  @persistedAsin
end

#phosphorusObject

Returns the value of attribute phosphorus.



3
4
5
# File 'lib/zutat/ingredient.rb', line 3

def phosphorus
  @phosphorus
end

#polyunsaturated_fatObject

Returns the value of attribute polyunsaturated_fat.



3
4
5
# File 'lib/zutat/ingredient.rb', line 3

def polyunsaturated_fat
  @polyunsaturated_fat
end

#potassiumObject

Returns the value of attribute potassium.



3
4
5
# File 'lib/zutat/ingredient.rb', line 3

def potassium
  @potassium
end

#proteinObject

Returns the value of attribute protein.



3
4
5
# File 'lib/zutat/ingredient.rb', line 3

def protein
  @protein
end

#riboflavinObject

Returns the value of attribute riboflavin.



3
4
5
# File 'lib/zutat/ingredient.rb', line 3

def riboflavin
  @riboflavin
end

#saturated_fatObject

Returns the value of attribute saturated_fat.



3
4
5
# File 'lib/zutat/ingredient.rb', line 3

def saturated_fat
  @saturated_fat
end

#seliniumObject

Returns the value of attribute selinium.



3
4
5
# File 'lib/zutat/ingredient.rb', line 3

def selinium
  @selinium
end

#servingObject

Returns the value of attribute serving.



3
4
5
# File 'lib/zutat/ingredient.rb', line 3

def serving
  @serving
end

#sodiumObject

Returns the value of attribute sodium.



3
4
5
# File 'lib/zutat/ingredient.rb', line 3

def sodium
  @sodium
end

#soluble_fiberObject

Returns the value of attribute soluble_fiber.



3
4
5
# File 'lib/zutat/ingredient.rb', line 3

def soluble_fiber
  @soluble_fiber
end

#sourceObject

Returns the value of attribute source.



3
4
5
# File 'lib/zutat/ingredient.rb', line 3

def source
  @source
end

#sulfurObject

Returns the value of attribute sulfur.



3
4
5
# File 'lib/zutat/ingredient.rb', line 3

def sulfur
  @sulfur
end

#thiaminObject

Returns the value of attribute thiamin.



3
4
5
# File 'lib/zutat/ingredient.rb', line 3

def thiamin
  @thiamin
end

#unitObject

Returns the value of attribute unit.



3
4
5
# File 'lib/zutat/ingredient.rb', line 3

def unit
  @unit
end

#urlObject

Returns the value of attribute url.



3
4
5
# File 'lib/zutat/ingredient.rb', line 3

def url
  @url
end

#vitamin_aObject

Returns the value of attribute vitamin_a.



3
4
5
# File 'lib/zutat/ingredient.rb', line 3

def vitamin_a
  @vitamin_a
end

#vitamin_b12Object

Returns the value of attribute vitamin_b12.



3
4
5
# File 'lib/zutat/ingredient.rb', line 3

def vitamin_b12
  @vitamin_b12
end

#vitamin_b6Object

Returns the value of attribute vitamin_b6.



3
4
5
# File 'lib/zutat/ingredient.rb', line 3

def vitamin_b6
  @vitamin_b6
end

#vitamin_cObject

Returns the value of attribute vitamin_c.



3
4
5
# File 'lib/zutat/ingredient.rb', line 3

def vitamin_c
  @vitamin_c
end

#vitamin_dObject

Returns the value of attribute vitamin_d.



3
4
5
# File 'lib/zutat/ingredient.rb', line 3

def vitamin_d
  @vitamin_d
end

#vitamin_eObject

Returns the value of attribute vitamin_e.



3
4
5
# File 'lib/zutat/ingredient.rb', line 3

def vitamin_e
  @vitamin_e
end

#vitamin_kObject

Returns the value of attribute vitamin_k.



3
4
5
# File 'lib/zutat/ingredient.rb', line 3

def vitamin_k
  @vitamin_k
end

#volumeStrObject

Returns the value of attribute volumeStr.



3
4
5
# File 'lib/zutat/ingredient.rb', line 3

def volumeStr
  @volumeStr
end

#zincObject

Returns the value of attribute zinc.



3
4
5
# File 'lib/zutat/ingredient.rb', line 3

def zinc
  @zinc
end