Class: Foodie::Generators::Recipe

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.source_rootObject



17
18
19
# File 'lib/foodie/generators/recipe.rb', line 17

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

Instance Method Details

#copy_recipeObject



13
14
15
# File 'lib/foodie/generators/recipe.rb', line 13

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

#create_groupObject



9
10
11
# File 'lib/foodie/generators/recipe.rb', line 9

def create_group
    empty_directory(group)
end