Class: Hecks::Domain::CLI::CommandBuilder
- Inherits:
-
Object
- Object
- Hecks::Domain::CLI::CommandBuilder
- Defined in:
- lib/cli/command_builder.rb,
lib/cli/builder/aggregate_command_line_builder.rb,
lib/cli/builder/reference_command_line_builder.rb,
lib/cli/builder/value_object_command_line_builder.rb
Defined Under Namespace
Modules: AggregateCommandLineBuilder, ReferenceCommandLineBuilder, ValueObjectCommandLineBuilder
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(name:, dry_run: false) ⇒ CommandBuilder
constructor
A new instance of CommandBuilder.
Constructor Details
#initialize(name:, dry_run: false) ⇒ CommandBuilder
Returns a new instance of CommandBuilder.
8 9 10 11 12 13 |
# File 'lib/cli/command_builder.rb', line 8 def initialize(name:, dry_run: false) @name = name @domain = DOMAIN @dry_run = dry_run @runner = CommandRunner.new(domain, name, dry_run) end |
Instance Method Details
#call ⇒ Object
15 16 17 18 19 20 21 22 23 24 |
# File 'lib/cli/command_builder.rb', line 15 def call delete_tmpfile puts "\n" generate :domain generate :modules generate :value_objects generate :references execute_tmpfile && return unless @dry_run print_tmpfile end |