module AntiCaptcha
The module AntiCaptcha
contains all the code for the anti_captcha gem. It acts as a safely namespace that isolates logic of AntiCaptcha
from any project that uses it.
Constants
- USER_AGENT
- VERSION
Public Class Methods
new(key, options = {})
click to toggle source
Creates an Anti Captcha API client. This is a shortcut to AntiCaptcha::Client.new
.
# File lib/anti_captcha.rb, line 16 def self.new(key, options = {}) AntiCaptcha::Client.new(key, options) end
raise_error(error_id, error_code, error_description)
click to toggle source
# File lib/anti_captcha/errors.rb, line 15 def self.raise_error(error_id, error_code, error_description) message = "ID: #{error_id} | CODE: #{error_code} | #{error_description}" raise AntiCaptcha::Error.new(message) end