Class: Space::Architect::CLI::Architect::Init

Inherits:
BaseCommand
  • Object
show all
Defined in:
lib/space_architect/cli/architect.rb

Instance Method Summary collapse

Instance Method Details

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



10
11
12
13
14
15
16
17
18
19
20
# File 'lib/space_architect/cli/architect.rb', line 10

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