Class: Decaptcha::Client

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/decaptcha/client.rb

Constant Summary collapse

PROVIDERS =
{
  :dbc_http   => Decaptcha::Provider::DeathByCaptcha::HTTP,
  :dbc_socket => Decaptcha::Provider::DeathByCaptcha::Socket,
}

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(provider_name, provider_options = {}) ⇒ Client

Returns a new instance of Client.


13
14
15
# File 'lib/decaptcha/client.rb', line 13

def initialize(provider_name, provider_options = {})
  @provider = PROVIDERS[provider_name.to_sym].new provider_options
end

Instance Attribute Details

#providerObject

Returns the value of attribute provider


6
7
8
# File 'lib/decaptcha/client.rb', line 6

def provider
  @provider
end