class Angus::Remote::RemoteResponse

A service’s response

Acts as an array to store information at HTTP level, like the status_code

Attributes

messages[RW]
status[RW]
status_code[RW]

Public Class Methods

new() click to toggle source
# File lib/angus/remote/remote_response.rb, line 16
def initialize
  @http_response_info = {}
end

Public Instance Methods

[](key) click to toggle source
# File lib/angus/remote/remote_response.rb, line 24
def [](key)
  @http_response_info[key]
end
[]=(key, value) click to toggle source
# File lib/angus/remote/remote_response.rb, line 20
def []=(key, value)
  @http_response_info[key] = value
end
to_hash() click to toggle source
# File lib/angus/remote/remote_response.rb, line 32
def to_hash
  {
    :http_status_code => @http_response_info[:status_code],
    :body => @http_response_info[:body],
    :service_name => @http_response_info[:service_name],
    :operation_name => @http_response_info[:operation_name],
  }
end
to_s() click to toggle source
# File lib/angus/remote/remote_response.rb, line 28
def to_s
  "#<#{self.class}:#{object_id}>"
end