Class: Sightengine::Response

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#nudity_confidenceObject

Returns the value of attribute nudity_confidence

Returns:

  • (Object)

    the current value of nudity_confidence



24
25
26
# File 'lib/sightengine.rb', line 24

def nudity_confidence
  @nudity_confidence
end

#nudity_resultObject

Returns the value of attribute nudity_result

Returns:

  • (Object)

    the current value of nudity_result



24
25
26
# File 'lib/sightengine.rb', line 24

def nudity_result
  @nudity_result
end

#statusObject

Returns the value of attribute status

Returns:

  • (Object)

    the current value of 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