Class: Space::Core::CLI::Use

Inherits:
BaseCommand
  • Object
show all
Defined in:
lib/space_core/cli/use.rb

Instance Method Summary collapse

Methods included from Helpers

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

Instance Method Details

#call(identifier:, **opts) ⇒ Object



8
9
10
11
12
13
14
15
# File 'lib/space_core/cli/use.rb', line 8

def call(identifier:, **opts)
  setup_terminal(**opts.slice(:color, :colors))
  render(store.use(identifier)) do |space|
    terminal.success "Recent space: #{space.id}"
    terminal.say terminal.path(space.path)
    CLI.record_outcome(Outcome.new(exit_code: 0))
  end
end