Module: Panmind::Recaptcha
- Defined in:
- lib/panmind/recaptcha.rb
Defined Under Namespace
Modules: Controller, Helpers, TestHelpers Classes: ConfigurationError
Constant Summary collapse
- Version =
1.0
Class Attribute Summary collapse
-
.private_key ⇒ Object
Returns the value of attribute private_key.
-
.public_key ⇒ Object
Returns the value of attribute public_key.
-
.request_timeout ⇒ Object
Returns the value of attribute request_timeout.
Class Method Summary collapse
Class Attribute Details
.private_key ⇒ Object
Returns the value of attribute private_key.
16 17 18 |
# File 'lib/panmind/recaptcha.rb', line 16 def private_key @private_key end |
.public_key ⇒ Object
Returns the value of attribute public_key.
16 17 18 |
# File 'lib/panmind/recaptcha.rb', line 16 def public_key @public_key end |
.request_timeout ⇒ Object
Returns the value of attribute request_timeout.
16 17 18 |
# File 'lib/panmind/recaptcha.rb', line 16 def request_timeout @request_timeout end |
Class Method Details
.enabled? ⇒ Boolean
27 28 29 |
# File 'lib/panmind/recaptcha.rb', line 27 def enabled? Rails.env.production? end |
.set(options) ⇒ Object
18 19 20 21 22 23 24 25 |
# File 'lib/panmind/recaptcha.rb', line 18 def set() self.private_key, self.public_key = .values_at(:private_key, :public_key) # Defaults # self.request_timeout = [:timeout] || 5 end |