module Picguard
Constants
- VERSION
Attributes
configuration[RW]
Public Class Methods
analyze(image_path:, safe_search: true, face_detection: true, threshold_adult: Picguard.configuration.threshold_adult, threshold_violence: Picguard.configuration.threshold_violence, threshold_face: Picguard.configuration.threshold_face )
click to toggle source
# File lib/picguard.rb, line 21 def self.analyze(image_path:, safe_search: true, face_detection: true, threshold_adult: Picguard.configuration.threshold_adult, threshold_violence: Picguard.configuration.threshold_violence, threshold_face: Picguard.configuration.threshold_face ) prepared_image_path = Services::ImagePreparator.new(image_path, face_detection, safe_search).call Services::Analyzer.new( Services::Builders::Request.new( prepared_image_path, safe_search, face_detection ).call, threshold_adult, threshold_violence, threshold_face ).call end
configure() { |configuration| ... }
click to toggle source
# File lib/picguard.rb, line 16 def self.configure self.configuration ||= Configuration.new yield(configuration) end