class BraspagRest::Configuration
Attributes
config_file_path[RW]
environment[RW]
logger[RW]
Public Instance Methods
log_enabled?()
click to toggle source
# File lib/braspag-rest/configuration.rb, line 16 def log_enabled? config['log_enable'] && logger end
merchant_id()
click to toggle source
# File lib/braspag-rest/configuration.rb, line 28 def merchant_id config['merchant_id'] end
merchant_key()
click to toggle source
# File lib/braspag-rest/configuration.rb, line 32 def merchant_key config['merchant_key'] end
query_url()
click to toggle source
# File lib/braspag-rest/configuration.rb, line 24 def query_url config['query_url'] end
request_timeout()
click to toggle source
# File lib/braspag-rest/configuration.rb, line 36 def request_timeout config.fetch('request_timeout', 60) end
url()
click to toggle source
# File lib/braspag-rest/configuration.rb, line 20 def url config['url'] end
Private Instance Methods
config()
click to toggle source
# File lib/braspag-rest/configuration.rb, line 42 def config @config ||= YAML.load(ERB.new(File.read(config_file_path)).result)[environment] end