Class: Potassium::RecipeGenerator
- Inherits:
-
Rails::Generators::NamedBase
- Object
- Rails::Generators::NamedBase
- Potassium::RecipeGenerator
- Defined in:
- lib/potassium/generators/recipe.rb
Class Attribute Summary collapse
-
.cli_options ⇒ Object
Returns the value of attribute cli_options.
Instance Method Summary collapse
Class Attribute Details
.cli_options ⇒ Object
Returns the value of attribute cli_options.
13 14 15 |
# File 'lib/potassium/generators/recipe.rb', line 13 def @cli_options end |
Instance Method Details
#run_generator ⇒ Object
16 17 18 19 20 21 |
# File 'lib/potassium/generators/recipe.rb', line 16 def run_generator require_relative "../helpers/template-dsl" TemplateDSL.extend_dsl(self, source_path: __FILE__) template_location = File.('../templates/recipe.rb', File.dirname(__FILE__)) instance_eval File.read(template_location), template_location end |