Module: RainCaptcha::Configuration
- Included in:
- RainCaptcha
- Defined in:
- lib/rain_captcha/configuration.rb
Constant Summary collapse
- RAINCAPTCHA_URL =
'raincaptcha.driversworld.us/captcha/'
Instance Attribute Summary collapse
-
#use_ssl ⇒ Object
Returns the value of attribute use_ssl.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#use_ssl ⇒ Object
Returns the value of attribute use_ssl.
3 4 5 |
# File 'lib/rain_captcha/configuration.rb', line 3 def use_ssl @use_ssl end |
Class Method Details
.extended(base) ⇒ Object
7 8 9 |
# File 'lib/rain_captcha/configuration.rb', line 7 def self.extended(base) base.reset end |
Instance Method Details
#configure {|_self| ... } ⇒ Object
11 12 13 |
# File 'lib/rain_captcha/configuration.rb', line 11 def configure yield self end |
#endpoint ⇒ Object
19 20 21 |
# File 'lib/rain_captcha/configuration.rb', line 19 def endpoint "#{self.protocol}://#{RAINCAPTCHA_URL}" end |
#protocol ⇒ Object
15 16 17 |
# File 'lib/rain_captcha/configuration.rb', line 15 def protocol self.use_ssl ? "https" : "http" end |
#reset ⇒ Object
23 24 25 |
# File 'lib/rain_captcha/configuration.rb', line 23 def reset self.use_ssl = false end |