Class: HammerCLIForeman::InfoCommand

Inherits:
SingleResourceCommand show all
Defined in:
lib/hammer_cli_foreman/commands.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Command

build_options, connection_name, create_option_builder, #customized_options, #dependency_resolver, dependency_resolver, #exception_handler_class, #get_identifier, #get_resource_id, #get_resource_ids, #option_sources, #request_params, #resolver, resolver, resource_config, resource_name_mapping, #searchables, searchables, #transform_format

Class Method Details

.command_name(name = nil) ⇒ Object



322
323
324
# File 'lib/hammer_cli_foreman/commands.rb', line 322

def self.command_name(name=nil)
  super(name) || "info"
end

Instance Method Details

#extend_data(record) ⇒ Object



331
332
333
# File 'lib/hammer_cli_foreman/commands.rb', line 331

def extend_data(record)
  record
end


335
336
337
# File 'lib/hammer_cli_foreman/commands.rb', line 335

def print_data(record)
  print_record(output_definition, record)
end

#send_requestObject



326
327
328
329
# File 'lib/hammer_cli_foreman/commands.rb', line 326

def send_request
  record = super
  extend_data(record)
end