Class: HammerCLIForeman::WriteCommand

Inherits:
HammerCLI::Apipie::WriteCommand
  • Object
show all
Defined in:
lib/hammer_cli_foreman/commands.rb

Instance Method Summary collapse

Instance Method Details

#send_requestObject



43
44
45
# File 'lib/hammer_cli_foreman/commands.rb', line 43

def send_request
  HammerCLIForeman.record_to_common_format(resource.call(action, request_params)[0])
end

#success_message_params(response) ⇒ Object



33
34
35
36
37
38
39
40
41
# File 'lib/hammer_cli_foreman/commands.rb', line 33

def success_message_params(response)
  if response
    if response.is_a?(Hash) and !response.empty?
      response[response.keys[0]]
    else
      response
    end
  end
end