Class: Sightengine::Response
- Inherits:
-
Struct
- Object
- Struct
- Sightengine::Response
- Defined in:
- lib/sightengine.rb
Instance Attribute Summary collapse
-
#nudity_confidence ⇒ Object
Returns the value of attribute nudity_confidence.
-
#nudity_result ⇒ Object
Returns the value of attribute nudity_result.
-
#status ⇒ Object
Returns the value of attribute status.
Class Method Summary collapse
Instance Attribute Details
#nudity_confidence ⇒ Object
Returns the value of attribute nudity_confidence
24 25 26 |
# File 'lib/sightengine.rb', line 24 def nudity_confidence @nudity_confidence end |
#nudity_result ⇒ Object
Returns the value of attribute nudity_result
24 25 26 |
# File 'lib/sightengine.rb', line 24 def nudity_result @nudity_result end |
#status ⇒ Object
Returns the value of attribute status
24 25 26 |
# File 'lib/sightengine.rb', line 24 def status @status end |
Class Method Details
.from_json(json) ⇒ Object
25 26 27 28 29 |
# File 'lib/sightengine.rb', line 25 def self.from_json(json) new(json['status'], json.dig('nudity', 'result'), json.dig('nudity', 'confidence')) end |