Class: KManager::Cli::Commands::New
- Inherits:
-
BaseCommand
- Object
- Dry::CLI::Command
- BaseCommand
- KManager::Cli::Commands::New
- Defined in:
- lib/k_manager/cli/new.rb
Instance Method Summary collapse
-
#call(project_folder:, builder_folder:, log_level:, force:, template:, **opts) ⇒ Object
rubocop:disable Metrics/ParameterLists.
Instance Method Details
#call(project_folder:, builder_folder:, log_level:, force:, template:, **opts) ⇒ Object
rubocop:disable Metrics/ParameterLists
52 53 54 55 56 57 58 59 60 61 |
# File 'lib/k_manager/cli/new.rb', line 52 def call(project_folder:, builder_folder:, log_level:, force:, template:, **opts) project_folder = absolute_path(project_folder, Dir.pwd) name = File.basename(project_folder) builder_folder = absolute_path(builder_folder, project_folder) template_root_folder = File.('~/dev/kgems/k_templates/definitions/starter') log_params(name, project_folder, builder_folder, force, log_level, template_root_folder, template, **opts) if log_level == 'debug' create_project(name, project_folder, builder_folder, template_root_folder, template, **opts) if can_create?(force, builder_folder) end |