Class: SpaceArchitect::CLI::Architect::Brief::New

Inherits:
Dry::CLI::Command
  • Object
show all
Includes:
GlobalOptions, Helpers
Defined in:
lib/space_architect/cli/architect.rb

Instance Method Summary collapse

Methods included from Helpers

#display_date, #handle_errors, #project_config, #render, #setup_terminal, #state, #store, #terminal

Methods included from GlobalOptions

included

Instance Method Details

#call(space: nil, force: false, **opts) ⇒ Object



385
386
387
388
389
390
391
392
393
394
395
# File 'lib/space_architect/cli/architect.rb', line 385

def call(space: nil, force: false, **opts)
  setup_terminal(**opts.slice(:color, :colors))
  handle_errors do
    render(store.find(space)) do |sp|
      mission = ArchitectMission.new(space: sp)
      path = mission.brief_new!(force: force)
      terminal.say "Brief ready: #{terminal.path(path)}"
      CLI.record_outcome(Outcome.new(exit_code: 0))
    end
  end
end