module SaferpayRuby::Configuration
Constants
- DEFAULTS
- VALID_CONFIG_KEYS
Public Class Methods
extended(base)
click to toggle source
Make sure we have the default values set when we get 'extended'
# File lib/saferpay_ruby/configuration.rb, line 25 def self.extended(base) base.reset end
Public Instance Methods
configure() { |self| ... }
click to toggle source
# File lib/saferpay_ruby/configuration.rb, line 35 def configure yield self end
options()
click to toggle source
# File lib/saferpay_ruby/configuration.rb, line 20 def options @options = Hash[ * DEFAULTS.map { |key, val| [key, send(key)] }.flatten ].freeze end
reset()
click to toggle source
# File lib/saferpay_ruby/configuration.rb, line 29 def reset options.each_pair do |key, val| send "#{key}=", DEFAULTS[key] end end