Class: Makit::Cli::Generators::BaseGenerator
- Inherits:
-
Object
- Object
- Makit::Cli::Generators::BaseGenerator
- Defined in:
- lib/makit/cli/generators/base_generator.rb
Overview
Base class for all project generators providing common functionality
Direct Known Subclasses
DotnetGenerator, NodeGenerator, RubyGenerator, RustGenerator
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
-
#generate(project_dir) ⇒ Object
Main generation method - creates the complete project structure.
-
#initialize(name, options = {}) ⇒ BaseGenerator
constructor
A new instance of BaseGenerator.
Constructor Details
#initialize(name, options = {}) ⇒ BaseGenerator
Returns a new instance of BaseGenerator.
12 13 14 15 |
# File 'lib/makit/cli/generators/base_generator.rb', line 12 def initialize(name, = {}) @name = name @options = end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
10 11 12 |
# File 'lib/makit/cli/generators/base_generator.rb', line 10 def name @name end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
10 11 12 |
# File 'lib/makit/cli/generators/base_generator.rb', line 10 def @options end |
Instance Method Details
#generate(project_dir) ⇒ Object
Main generation method - creates the complete project structure
18 19 20 21 22 |
# File 'lib/makit/cli/generators/base_generator.rb', line 18 def generate(project_dir) create_directory_structure(project_dir) create_files(project_dir) (project_dir) end |