Sha256: e737d9127dbbf57d682d2e6b8c06706dbaf048fa000fc9b66df3aa7e7061b961

Contents?: true

Size: 447 Bytes

Versions: 1

Compression:

Stored size: 447 Bytes

Contents

require 'thor/group'

module Foodie
  module Generators
    class Recipe < Thor::Group
      include Thor::Actions

      argument :group, :type => :string
      argument :name, :type => :string

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

      def create_group
        empty_directory(group)
      end

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

    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mnwani-foodie-0.1.0 lib/foodie/generators/recipe.rb