class Docomoru::Commands::Request

Public Instance Methods

call() click to toggle source
# File lib/docomoru/commands/request.rb, line 8
def call
  response = client.send(
    @arguments.method_name,
    *@arguments.arguments,
    @arguments.params,
    @arguments.headers,
  )
  print ResponseRenderer.new(
    response,
    show_body: @arguments.show_body,
    show_header: @arguments.show_header,
  )
end

Private Instance Methods

client() click to toggle source
# File lib/docomoru/commands/request.rb, line 24
def client
  Client.new(api_key: @arguments.api_key)
end