class TigerPayment::Configuration
The Configuration
class is responsible for determining your username/password based on your given RAILS_ENV and RAILS_ROOT. It looks for a yaml configuration file at:
#{RAILS_ROOT}/config/tiger-payment/#{RAILS_ENV}.yml
A sample test configuration would be:
username: demo password: password
Public Class Methods
new()
click to toggle source
# File lib/tiger-payment/configuration.rb, line 11 def initialize config_path = File.join(Rails.root, "config", "tiger-payment", "#{Rails.env}.yml") @config = YAML.load(File.read(config_path)) end
Public Instance Methods
password()
click to toggle source
# File lib/tiger-payment/configuration.rb, line 20 def password @config["password"] end
username()
click to toggle source
# File lib/tiger-payment/configuration.rb, line 16 def username @config["username"] end