module Sightengine::Api::Responses::Nudity

Public Class Methods

included(base) click to toggle source
# File lib/sightengine/api/responses/nudity.rb, line 5
def self.included(base)
  base.class_eval do
    attr_accessor :nudity
  end
end

Public Instance Methods

partial_nudity?(min_prob = 0.9) click to toggle source
# File lib/sightengine/api/responses/nudity.rb, line 15
def partial_nudity?(min_prob = 0.9)
  nudity["partial"].to_f >= min_prob.to_f
end
raw_nudity?(min_prob = 0.9) click to toggle source
# File lib/sightengine/api/responses/nudity.rb, line 11
def raw_nudity?(min_prob = 0.9)
  nudity["raw"].to_f >= min_prob.to_f
end
safe?(min_prob = 0.9) click to toggle source
# File lib/sightengine/api/responses/nudity.rb, line 19
def safe?(min_prob = 0.9)
  nudity["safe"].to_f >= min_prob.to_f
end