module UnifiedPayment
Constants
- VERSION
Public Class Methods
config()
click to toggle source
# File lib/unified_payment.rb, line 23 def self.config @config end
configure(opts = {})
click to toggle source
Configure through hash
# File lib/unified_payment.rb, line 10 def self.configure(opts = {}) opts.each {|k,v| @config[k.to_sym] = v if @valid_config_keys.include? k.to_sym} end
configure_with(path_to_yaml_file)
click to toggle source
Configure through yaml file
# File lib/unified_payment.rb, line 15 def self.configure_with(path_to_yaml_file) config = YAML::load(IO.read(path_to_yaml_file)) global_config = config.select { |key, value| value.class != Hash } || {} env_config = config[Rails.env] || {} config = global_config.merge(env_config) configure(config) end