Class: JDC::Cli::Command::User

Inherits:
Base show all
Defined in:
lib/cli/commands/user.rb

Constant Summary

Constants inherited from Base

Base::MANIFEST

Instance Attribute Summary

Attributes inherited from Base

#no_prompt, #prompt_ok

Instance Method Summary collapse

Methods inherited from Base

#auth_token, #client, #client_info, #find_in_hash, #find_symbol, #frameworks_info, #initialize, #load_manifest, #load_manifest_structure, #manifest, #manifest_file, #merge_manifest, #merge_parent, #resolve_in, #resolve_lexically, #resolve_manifest, #resolve_symbol, #runtimes_info, #target_base, #target_url

Constructor Details

This class inherits a constructor from JDC::Cli::Command::Base

Instance Method Details

#infoObject



5
6
7
8
9
10
# File 'lib/cli/commands/user.rb', line 5

def info
  info = client_info
  username = info[:user] || 'N/A'
  return display JSON.pretty_generate([username]) if @options[:json]
  display "\n[#{username}]"
end