module Recaptcha
Constants
- CONFIG
- HANDLE_TIMEOUTS_GRACEFULLY
- RECAPTCHA_API_VERSION
- SKIP_VERIFY_ENV
- USE_SSL_BY_DEFAULT
- VERSION
Public Class Methods
configuration()
click to toggle source
Gives access to the current Configuration.
# File lib/recaptcha.rb, line 27 def self.configuration @configuration ||= Configuration.new end
configure() { |config| ... }
click to toggle source
Allows easy setting of multiple configuration options. See Configuration for all available options.
# File lib/recaptcha.rb, line 37 def self.configure config = configuration yield(config) end
with_configuration(config) { || ... }
click to toggle source
# File lib/recaptcha.rb, line 42 def self.with_configuration(config) original_config = {} config.each do |key, value| original_config[key] = configuration.send(key) configuration.send("#{key}=", value) end result = yield if block_given? original_config.each { |key, value| configuration.send("#{key}=", value) } result end