Class: RecipeBox::CreateRecipe

Inherits:
Thor::Group
  • Object
show all
Includes:
Thor::Actions
Defined in:
lib/recipe_box/create_recipe.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.source_rootObject



7
8
9
# File 'lib/recipe_box/create_recipe.rb', line 7

def self.source_root
  File.dirname(__FILE__)
end

Instance Method Details

#create_directoryObject



11
12
13
# File 'lib/recipe_box/create_recipe.rb', line 11

def create_directory
  empty_directory(name)
end

#create_recipeObject



15
16
17
# File 'lib/recipe_box/create_recipe.rb', line 15

def create_recipe
  template("../../templates/recipe.tt", "#{name}/#{name}.markdown")
end