Class: Sightengine::Api::Scam::Response

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

Instance Attribute Summary collapse

Attributes inherited from Response

#error, #media, #request, #status

Instance Method Summary collapse

Methods inherited from Response

#initialize

Constructor Details

This class inherits a constructor from Sightengine::Api::Response

Instance Attribute Details

#facesObject

Returns the value of attribute faces.



5
6
7
# File 'lib/sightengine/api/scam.rb', line 5

def faces
  @faces
end

#scamObject

Returns the value of attribute scam.



5
6
7
# File 'lib/sightengine/api/scam.rb', line 5

def scam
  @scam
end

Instance Method Details

#scam?(min_prob = 0.8) ⇒ Boolean

Returns:

  • (Boolean)


7
8
9
# File 'lib/sightengine/api/scam.rb', line 7

def scam?(min_prob = 0.8)
  scam["prob"].to_f > min_prob
end