Gives access to the current Configuration.
# File lib/recaptcha.rb, line 15 def self.configuration @configuration ||= Configuration.new end
Allows easy setting of multiple configuration options. See Configuration for all available options.
# File lib/recaptcha.rb, line 25 def self.configure config = configuration yield(config) end
# File lib/recaptcha.rb, line 30 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