Class: Amazon::Associates::Response

Inherits:
ApiResult show all
Defined in:
lib/amazon-associates/responses/response.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(url) ⇒ Response

Returns a new instance of Response.



10
11
12
# File 'lib/amazon-associates/responses/response.rb', line 10

def initialize(url)
  @url = url
end

Instance Attribute Details

#urlObject (readonly)

Returns the value of attribute url.



4
5
6
# File 'lib/amazon-associates/responses/response.rb', line 4

def url
  @url
end

Instance Method Details

#==(other) ⇒ Object



14
15
16
17
18
# File 'lib/amazon-associates/responses/response.rb', line 14

def ==(other)
  (instance_variables.sort == other.instance_variables.sort) && instance_variables.all? do |v|
    instance_variable_get(v) == other.instance_variable_get(v)
  end
end

#errorsObject



6
7
8
# File 'lib/amazon-associates/responses/response.rb', line 6

def errors
  request.errors
end