Class: ProMashTxt::Additive
- Inherits:
-
Brewser::Additive
- Object
- Brewser::Model
- Brewser::Additive
- ProMashTxt::Additive
- Defined in:
- lib/brewser/engines/promash_txt.rb
Instance Method Summary collapse
Methods inherited from Brewser::Additive
Methods inherited from Brewser::Model
#as_beerxml, #as_brewson, auto_migrate_down!, auto_migrate_up!, auto_upgrade!, default_repository_name
Instance Method Details
#from_promash(string) ⇒ Object
66 67 68 69 70 71 72 73 74 75 |
# File 'lib/brewser/engines/promash_txt.rb', line 66 def from_promash(string) # String should look like this: # 1.00 Tsp Irish Moss Fining 15 Min.(boil) self.amount = string[0..10].strip.downcase.u self.name = string[14..44].strip self.type = string[45..54].strip self.time = string[55..61].strip.downcase.gsub(".","").u self.added_when = string[63..66].capitalize return self end |