Class: A2::Subcommand::User::Get

Inherits:
CmdParse::Command
  • Object
show all
Defined in:
lib/a2/subcommands/user.rb

Instance Method Summary collapse

Constructor Details

#initializeGet

Returns a new instance of Get.



28
29
30
# File 'lib/a2/subcommands/user.rb', line 28

def initialize
  super('get-user', takes_commands: false)
end

Instance Method Details

#execute(id) ⇒ Object



32
33
34
# File 'lib/a2/subcommands/user.rb', line 32

def execute(id)
  puts JSON.pretty_generate(A2::Client.new(command_parser.data).get_user(id))
end