Sha256: 7760c0474d66a103c13ceee68d90d2e212648a34580216f0968c8670520c2b7e

Contents?: true

Size: 436 Bytes

Versions: 2

Compression:

Stored size: 436 Bytes

Contents

require 'thor/group'
module Foodie
  module Generators
    class Recipe < Thor::Group
      include Thor::Actions
      def create_group
        empty_directory(group)
      end
      def copy_recipe
        template("recipe.txt", "#{group}/#{name}.txt")
      end
      def self.source_root
        File.dirname(__FILE__) + "/recipe"
      end
      argument :group, type: :string
      argument :name, type: :string
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
foodie_hunt-1.1.1 lib/foodie/generators/recipe.rb
foodie_hunt-0.1.0 lib/foodie/generators/recipe.rb