Class: ReCaptcha::Client
- Inherits:
-
Object
- Object
- ReCaptcha::Client
- Extended by:
- Forwardable
- Includes:
- Application
- Defined in:
- lib/re_captcha/client.rb
Instance Attribute Summary collapse
-
#env ⇒ Object
readonly
Returns the value of attribute env.
Instance Method Summary collapse
-
#initialize(configuration) ⇒ Client
constructor
A new instance of Client.
Methods included from Application
Methods included from API
Constructor Details
#initialize(configuration) ⇒ Client
Returns a new instance of Client.
12 13 14 15 16 |
# File 'lib/re_captcha/client.rb', line 12 def initialize(configuration) @configuration = configuration @env = ENV['RACK_ENV'] || ENV['RAILS_ENV'] || 'development' raise ConfigurationError.new('Invalid configuration') unless configuration.valid? end |
Instance Attribute Details
#env ⇒ Object (readonly)
Returns the value of attribute env.
10 11 12 |
# File 'lib/re_captcha/client.rb', line 10 def env @env end |