class UnionPay::Core::Config
Attributes
config[R]
Public Class Methods
mobile_config(file_name, env='development')
click to toggle source
# File lib/union-pay/core/config.rb, line 19 def self.mobile_config(file_name, env='development') config = read_config_file(file_name)['mobile'][env] config = Utils.key_to_sym(config) new(config) end
new(config)
click to toggle source
# File lib/union-pay/core/config.rb, line 8 def initialize(config) @config = config end
read_config_file(file_name)
click to toggle source
# File lib/union-pay/core/config.rb, line 12 def self.read_config_file(file_name) erb = ERB.new(File.read(file_name)) erb.filename = file_name YAML.load(erb.result) end