Class: GoPay::Configuration
- Inherits:
-
Object
- Object
- GoPay::Configuration
- Defined in:
- lib/gopay/config.rb
Instance Attribute Summary collapse
-
#country_codes ⇒ Object
readonly
Returns the value of attribute country_codes.
-
#environment ⇒ Object
Returns the value of attribute environment.
-
#failed_url ⇒ Object
Returns the value of attribute failed_url.
-
#goid ⇒ Object
Returns the value of attribute goid.
-
#messages ⇒ Object
readonly
Returns the value of attribute messages.
-
#secure_key ⇒ Object
Returns the value of attribute secure_key.
-
#success_url ⇒ Object
Returns the value of attribute success_url.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #urls ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
48 49 50 51 52 53 |
# File 'lib/gopay/config.rb', line 48 def initialize @country_codes = YAML.load_file File.join(BASE_PATH, "config", "country_codes.yml") config = YAML.load_file(File.join(BASE_PATH, "config", "config.yml")) @urls = config["urls"] @messages = config["messages"] end |
Instance Attribute Details
#country_codes ⇒ Object (readonly)
Returns the value of attribute country_codes.
46 47 48 |
# File 'lib/gopay/config.rb', line 46 def country_codes @country_codes end |
#environment ⇒ Object
Returns the value of attribute environment.
45 46 47 |
# File 'lib/gopay/config.rb', line 45 def environment @environment end |
#failed_url ⇒ Object
Returns the value of attribute failed_url.
45 46 47 |
# File 'lib/gopay/config.rb', line 45 def failed_url @failed_url end |
#goid ⇒ Object
Returns the value of attribute goid.
45 46 47 |
# File 'lib/gopay/config.rb', line 45 def goid @goid end |
#messages ⇒ Object (readonly)
Returns the value of attribute messages.
46 47 48 |
# File 'lib/gopay/config.rb', line 46 def @messages end |
#secure_key ⇒ Object
Returns the value of attribute secure_key.
45 46 47 |
# File 'lib/gopay/config.rb', line 45 def secure_key @secure_key end |
#success_url ⇒ Object
Returns the value of attribute success_url.
45 46 47 |
# File 'lib/gopay/config.rb', line 45 def success_url @success_url end |
Instance Method Details
#urls ⇒ Object
55 56 57 58 |
# File 'lib/gopay/config.rb', line 55 def urls env = @environment.nil? ? "test" : @environment.to_s @urls[env] end |