Class: SpaceArchitect::CLI::Show
- Inherits:
-
Dry::CLI::Command
- Object
- Dry::CLI::Command
- SpaceArchitect::CLI::Show
- Includes:
- GlobalOptions, Helpers
- Defined in:
- lib/space_architect/cli/show.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
Instance Method Details
#call(identifier: nil, **opts) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/space_architect/cli/show.rb', line 12 def call(identifier: nil, **opts) setup_terminal(**opts.slice(:color, :colors)) render(store.find(identifier)) do |space| terminal.say "ID: #{space.id}" terminal.say "Title: #{space.title}" terminal.say "Status: #{space.status}" terminal.say "Path: #{terminal.path(space.path)}" terminal.say "Created: #{space.data['created_at']}" terminal.say "Updated: #{space.data['updated_at']}" CLI.record_outcome(Outcome.new(exit_code: 0)) end end |