Sha256: 241eb574581103f1d7eb80d78ba2113d6db2951b915020385a18fe35499041ba

Contents?: true

Size: 446 Bytes

Versions: 1

Compression:

Stored size: 446 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 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
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ryoung-foodie-0.0.3 lib/foodie/generators/recipe.rb