Sha256: d428a5f13ded994e42138ed4c95345c95a7907eb5f497303229439b6b3de344f

Contents?: true

Size: 471 Bytes

Versions: 2

Compression:

Stored size: 471 Bytes

Contents

# frozen_string_literal: true

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

2 entries across 2 versions & 1 rubygems

Version Path
foodie-oscarpay4-test-0.2.1 lib/foodie/generators/recipe.rb
foodie-oscarpay4-test-0.2.0 lib/foodie/generators/recipe.rb