1 # file: spec/fixtures/sub-dir/demo3.xxx.rb
 2 # from: https://github.com/radar/guides/blob/master/gem-development/foodie/lib/foodie/generators/recipe.rb
 3 require 'thor/group'
 4 module Foodie
 5   module Generators
 6     class Recipe < Thor::Group
 7       argument :group:type => :string
 8       argument :name:type => :string
 9       include Thor::Actions
10 
11       def self.source_root
12         File.dirname(__FILE__+ "/recipe"
13       end
14 
15       def create_group
16         empty_directory(group)
17       end
18 
19       def copy_recipe
20         template("recipe.txt""#{group}/#{name}.txt")
21       end
22     end
23   end
24 en