Class: Bently::Base
- Inherits:
-
Thor
- Object
- Thor
- Bently::Base
- Includes:
- Thor::Actions
- Defined in:
- lib/bently/base.rb
Instance Method Summary collapse
Instance Method Details
#bake(recipe) ⇒ Object
22 23 24 25 26 27 28 29 |
# File 'lib/bently/base.rb', line 22 def bake recipe recipe = Recipebook.find(recipe) if ['step'] step recipe else exec recipe end end |
#list(str = nil) ⇒ Object
7 8 9 10 11 |
# File 'lib/bently/base.rb', line 7 def list str=nil recipes = Recipebook.all recipes = recipes.select{|r| r =~ /#{str}/ } if str recipes.each {|f| puts f } end |
#read(recipe) ⇒ Object
15 16 17 18 |
# File 'lib/bently/base.rb', line 15 def read recipe recipe = Recipebook.find(recipe) exec recipe end |
#source(recipe) ⇒ Object
32 33 34 35 |
# File 'lib/bently/base.rb', line 32 def source recipe recipe = Recipebook.find(recipe) puts recipe.homepage end |