Class: HammerCLI::ShellMainCommand::AuthCommand::InfoCommand

Inherits:
AbstractCommand
  • Object
show all
Defined in:
lib/hammer_cli/shell.rb

Instance Method Summary collapse

Methods inherited from AbstractCommand

#adapter, #exception_handler, inherited_output_definition, #initialize, output, #output, output_definition, #output_definition, #parent_command, #parse, remove_subcommand, #run, subcommand, subcommand!, validate_options, #validate_options

Constructor Details

This class inherits a constructor from HammerCLI::AbstractCommand

Instance Method Details

#executeObject



66
67
68
69
70
71
72
73
# File 'lib/hammer_cli/shell.rb', line 66

def execute
  if username(false)
    print_message("You are logged in as [ %s ]." % username(false))
  else
    print_message("You are currently not logged in.\nUse 'auth login' to set credentials.")
  end
  HammerCLI::EX_OK
end