Class: Sightengine::Api::Response

Inherits:
Object
  • Object
show all
Defined in:
lib/sightengine/api/response.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hash) ⇒ Response

Returns a new instance of Response.



6
7
8
9
10
# File 'lib/sightengine/api/response.rb', line 6

def initialize(hash)
  hash.each do |k, v|
    send("#{k}=", v) if methods.include?("#{k}=".to_sym)
  end
end

Instance Attribute Details

#errorObject

Returns the value of attribute error.



4
5
6
# File 'lib/sightengine/api/response.rb', line 4

def error
  @error
end

#mediaObject

Returns the value of attribute media.



4
5
6
# File 'lib/sightengine/api/response.rb', line 4

def media
  @media
end

#requestObject

Returns the value of attribute request.



4
5
6
# File 'lib/sightengine/api/response.rb', line 4

def request
  @request
end

#statusObject

Returns the value of attribute status.



4
5
6
# File 'lib/sightengine/api/response.rb', line 4

def status
  @status
end