Class: Sightengine::Api::Response
- Inherits:
-
Object
- Object
- Sightengine::Api::Response
- Includes:
- Sightengine::Api::Responses::Celebrity, Sightengine::Api::Responses::FaceAttributes, Sightengine::Api::Responses::Nudity, Sightengine::Api::Responses::Scam, Sightengine::Api::Responses::Wad
- Defined in:
- lib/sightengine/api/response.rb
Instance Attribute Summary collapse
-
#error ⇒ Object
Returns the value of attribute error.
-
#media ⇒ Object
Returns the value of attribute media.
-
#request ⇒ Object
Returns the value of attribute request.
-
#status ⇒ Object
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(hash) ⇒ Response
constructor
A new instance of Response.
Methods included from Sightengine::Api::Responses::Celebrity
Methods included from Sightengine::Api::Responses::FaceAttributes
Methods included from Sightengine::Api::Responses::Scam
Methods included from Sightengine::Api::Responses::Wad
#alcohol?, #drugs?, included, #weapon?
Methods included from Sightengine::Api::Responses::Nudity
included, #partial_nudity?, #raw_nudity?, #safe?
Constructor Details
#initialize(hash) ⇒ Response
Returns a new instance of Response.
18 19 20 21 22 |
# File 'lib/sightengine/api/response.rb', line 18 def initialize(hash) hash.each do |k, v| send("#{k}=", v) if methods.include?("#{k}=".to_sym) end end |
Instance Attribute Details
#error ⇒ Object
Returns the value of attribute error.
16 17 18 |
# File 'lib/sightengine/api/response.rb', line 16 def error @error end |
#media ⇒ Object
Returns the value of attribute media.
16 17 18 |
# File 'lib/sightengine/api/response.rb', line 16 def media @media end |
#request ⇒ Object
Returns the value of attribute request.
16 17 18 |
# File 'lib/sightengine/api/response.rb', line 16 def request @request end |
#status ⇒ Object
Returns the value of attribute status.
16 17 18 |
# File 'lib/sightengine/api/response.rb', line 16 def status @status end |