Class: A2::Subcommand::NodeMgmt::Get

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

Instance Method Summary collapse

Constructor Details

#initializeGet

Returns a new instance of Get.



5
6
7
# File 'lib/a2/subcommands/node_mgmt.rb', line 5

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

Instance Method Details

#execute(id) ⇒ Object



9
10
11
# File 'lib/a2/subcommands/node_mgmt.rb', line 9

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