Class: HammerCLIForeman::Auth::InfoCommand

Inherits:
HammerCLI::AbstractCommand
  • Object
show all
Defined in:
lib/hammer_cli_foreman/auth.rb

Instance Method Summary collapse

Instance Method Details

#executeObject



35
36
37
38
39
40
41
42
# File 'lib/hammer_cli_foreman/auth.rb', line 35

def execute
  unless HammerCLIForeman.credentials.empty?
    print_message(_("You are logged in as '%s'") % HammerCLIForeman.credentials.username)
  else
    print_message(_("You are currently not logged in to any service.\nUse the service to set credentials."))
  end
  HammerCLI::EX_OK
end