Class: Decaptcha::Client
- Inherits:
-
Object
- Object
- Decaptcha::Client
- 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
-
#provider ⇒ Object
Returns the value of attribute provider.
Instance Method Summary collapse
-
#initialize(provider_name, provider_options = {}) ⇒ Client
constructor
A new instance of Client.
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 = PROVIDERS[provider_name.to_sym].new end |
Instance Attribute Details
#provider ⇒ Object
Returns the value of attribute provider.
6 7 8 |
# File 'lib/decaptcha/client.rb', line 6 def provider @provider end |