Class: NRB::BeerXML::Recipe

Inherits:
Record
  • Object
show all
Defined in:
lib/beerxml/recipe.rb

Instance Attribute Summary collapse

Attributes inherited from Record

#name, #version

Instance Method Summary collapse

Methods inherited from Record

#equipment?, #fermentable?, #hop?, #initialize, #mash_profile?, #mash_step?, #misc?, #persisted?, #recipe?, #record_type, #style?, #water?, #yeast?

Methods included from Inflector

#camelize, #underscore

Constructor Details

This class inherits a constructor from NRB::BeerXML::Record

Instance Attribute Details

#ageObject

time



9
10
11
# File 'lib/beerxml/recipe.rb', line 9

def age
  @age
end

#age_tempObject

temperature



10
11
12
# File 'lib/beerxml/recipe.rb', line 10

def age_temp
  @age_temp
end

#asst_brewerObject

string



11
12
13
# File 'lib/beerxml/recipe.rb', line 11

def asst_brewer
  @asst_brewer
end

#batch_sizeObject

volume required



12
13
14
# File 'lib/beerxml/recipe.rb', line 12

def batch_size
  @batch_size
end

#boil_sizeObject

volume required



13
14
15
# File 'lib/beerxml/recipe.rb', line 13

def boil_size
  @boil_size
end

#boil_timeObject

time required



14
15
16
# File 'lib/beerxml/recipe.rb', line 14

def boil_time
  @boil_time
end

#brewerObject

string required



15
16
17
# File 'lib/beerxml/recipe.rb', line 15

def brewer
  @brewer
end

#carbonationObject

float



16
17
18
# File 'lib/beerxml/recipe.rb', line 16

def carbonation
  @carbonation
end

#carbonation_tempObject

temperature



17
18
19
# File 'lib/beerxml/recipe.rb', line 17

def carbonation_temp
  @carbonation_temp
end

#dateObject

string



18
19
20
# File 'lib/beerxml/recipe.rb', line 18

def date
  @date
end

#efficiencyObject

percentage conditionally required



19
20
21
# File 'lib/beerxml/recipe.rb', line 19

def efficiency
  @efficiency
end

#equipmentObject

equipment record



20
21
22
# File 'lib/beerxml/recipe.rb', line 20

def equipment
  @equipment
end

#fermentablesObject

fermentables record set required



21
22
23
# File 'lib/beerxml/recipe.rb', line 21

def fermentables
  @fermentables
end

#fermentation_stagesObject

integer



22
23
24
# File 'lib/beerxml/recipe.rb', line 22

def fermentation_stages
  @fermentation_stages
end

#fgObject

specific gravity



23
24
25
# File 'lib/beerxml/recipe.rb', line 23

def fg
  @fg
end

#forced_carbonationObject

boolean



24
25
26
# File 'lib/beerxml/recipe.rb', line 24

def forced_carbonation
  @forced_carbonation
end

#hopsObject

hops record set required



25
26
27
# File 'lib/beerxml/recipe.rb', line 25

def hops
  @hops
end

#keg_priming_factorObject

float



26
27
28
# File 'lib/beerxml/recipe.rb', line 26

def keg_priming_factor
  @keg_priming_factor
end

#mashObject

mash profile record required



27
28
29
# File 'lib/beerxml/recipe.rb', line 27

def mash
  @mash
end

#miscsObject

miscs record set required



28
29
30
# File 'lib/beerxml/recipe.rb', line 28

def miscs
  @miscs
end

#notesObject

string



29
30
31
# File 'lib/beerxml/recipe.rb', line 29

def notes
  @notes
end

#ogObject

specific gravity



30
31
32
# File 'lib/beerxml/recipe.rb', line 30

def og
  @og
end

#primary_ageObject

time



31
32
33
# File 'lib/beerxml/recipe.rb', line 31

def primary_age
  @primary_age
end

#primary_tempObject

temperature



32
33
34
# File 'lib/beerxml/recipe.rb', line 32

def primary_temp
  @primary_temp
end

#priming_sugar_equivObject

float



33
34
35
# File 'lib/beerxml/recipe.rb', line 33

def priming_sugar_equiv
  @priming_sugar_equiv
end

#priming_sugar_nameObject

string



34
35
36
# File 'lib/beerxml/recipe.rb', line 34

def priming_sugar_name
  @priming_sugar_name
end

#secondary_ageObject

time



35
36
37
# File 'lib/beerxml/recipe.rb', line 35

def secondary_age
  @secondary_age
end

#secondary_tempObject

temperature



36
37
38
# File 'lib/beerxml/recipe.rb', line 36

def secondary_temp
  @secondary_temp
end

#styleObject

style record required



37
38
39
# File 'lib/beerxml/recipe.rb', line 37

def style
  @style
end

#taste_notesObject

string



38
39
40
# File 'lib/beerxml/recipe.rb', line 38

def taste_notes
  @taste_notes
end

#taste_ratingObject

float



39
40
41
# File 'lib/beerxml/recipe.rb', line 39

def taste_rating
  @taste_rating
end

#tertiary_ageObject

time



40
41
42
# File 'lib/beerxml/recipe.rb', line 40

def tertiary_age
  @tertiary_age
end

#tertiary_tempObject

temperature



41
42
43
# File 'lib/beerxml/recipe.rb', line 41

def tertiary_temp
  @tertiary_temp
end

#typeObject

list required



42
43
44
# File 'lib/beerxml/recipe.rb', line 42

def type
  @type
end

#watersObject

waters record set required



43
44
45
# File 'lib/beerxml/recipe.rb', line 43

def waters
  @waters
end

#yeastsObject

yeasts record set required



44
45
46
# File 'lib/beerxml/recipe.rb', line 44

def yeasts
  @yeasts
end

Instance Method Details

#efficiency_required?Boolean

Returns:

  • (Boolean)


84
85
86
# File 'lib/beerxml/recipe.rb', line 84

def efficiency_required?
  ["ALl Grain", "Partial Mash"].include?(type)
end

#set_up_record_setsObject



89
90
91
92
93
# File 'lib/beerxml/recipe.rb', line 89

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