class NRB::BeerXML::Recipe
Attributes
age[RW]
age_temp[RW]
asst_brewer[RW]
batch_size[RW]
boil_size[RW]
boil_time[RW]
brewer[RW]
carbonation[RW]
carbonation_temp[RW]
date[RW]
efficiency[RW]
equipment[R]
fermentables[RW]
fermentation_stages[RW]
fg[RW]
forced_carbonation[RW]
hops[RW]
keg_priming_factor[RW]
mash[RW]
miscs[RW]
notes[RW]
og[RW]
primary_age[RW]
primary_temp[RW]
priming_sugar_equiv[RW]
priming_sugar_name[RW]
secondary_age[RW]
secondary_temp[RW]
style[R]
taste_notes[RW]
taste_rating[RW]
tertiary_age[RW]
tertiary_temp[RW]
type[RW]
waters[RW]
yeasts[RW]
Public Instance Methods
efficiency_required?()
click to toggle source
# File lib/nrb/beerxml/recipe.rb, line 83 def efficiency_required? ["ALl Grain", "Partial Mash"].include?(type) end
equipment=(equipment)
click to toggle source
# File lib/nrb/beerxml/recipe.rb, line 78 def equipment=(equipment) restricted_assign :equipment, equipment end
set_up_record_sets()
click to toggle source
# File lib/nrb/beerxml/recipe.rb, line 88 def set_up_record_sets %i(fermentable hop misc water yeast).each do |record_type| send "#{record_type}s=", RecordSet.new(record_type: record_type) end end
style=(style)
click to toggle source
# File lib/nrb/beerxml/recipe.rb, line 95 def style=(style) restricted_assign :style, style end
Private Instance Methods
restricted_assign(type, value)
click to toggle source
# File lib/nrb/beerxml/recipe.rb, line 101 def restricted_assign(type, value) raise "Can't assign a non-#{type} to #{type} (got a #{value.record_type}" unless value.nil? || value.send("#{type}?") instance_variable_set "@#{type}", value end