Class: FoodieTool::Generators::Recipe

Inherits:
Thor::Group
  • Object
show all
Includes:
Thor::Actions
Defined in:
lib/foodie_tool/generators/recipe.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.source_rootObject



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

def self.source_root
  File.dirname(__FILE__) + '/recipe'
end

Instance Method Details

#copy_recipeObject



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

def copy_recipe
  template('recipe.txt', "#{group}/#{name}.txt")
end

#create_groupObject



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

def create_group
  empty_directory(group)
end