class NRB::BeerXML::Record

Attributes

name[RW]
version[RW]

Public Class Methods

new(*args) click to toggle source
Calls superclass method
# File lib/nrb/beerxml/record.rb, line 18
def initialize(*args)
  super
  run_callbacks :initialize
end

Public Instance Methods

equipment?() click to toggle source
# File lib/nrb/beerxml/record.rb, line 29
def equipment?;    am_a? :equipment; end
fermentable?() click to toggle source
# File lib/nrb/beerxml/record.rb, line 30
def fermentable?;  am_a? :fermentable; end
hop?() click to toggle source
# File lib/nrb/beerxml/record.rb, line 31
def hop?;          am_a? :hop; end
mash?() click to toggle source
# File lib/nrb/beerxml/record.rb, line 32
def mash?;         am_a? :mash; end
mash_step?() click to toggle source
# File lib/nrb/beerxml/record.rb, line 33
def mash_step?;    am_a? :mash_step; end
misc?() click to toggle source
# File lib/nrb/beerxml/record.rb, line 34
def misc?;         am_a? :misc; end
persisted?() click to toggle source
# File lib/nrb/beerxml/record.rb, line 40
def persisted?; false; end
recipe?() click to toggle source
# File lib/nrb/beerxml/record.rb, line 35
def recipe?;       am_a? :recipe; end
record_type() click to toggle source
# File lib/nrb/beerxml/record.rb, line 24
def record_type
  underscore(self.class.name.split(/::/).last).to_sym
end
style?() click to toggle source
# File lib/nrb/beerxml/record.rb, line 36
def style?;        am_a? :style; end
water?() click to toggle source
# File lib/nrb/beerxml/record.rb, line 37
def water?;        am_a? :water; end
yeast?() click to toggle source
# File lib/nrb/beerxml/record.rb, line 38
def yeast?;        am_a? :yeast; end

Private Instance Methods

am_a?(question) click to toggle source
# File lib/nrb/beerxml/record.rb, line 44
def am_a?(question); record_type == question; end