Class: Walletone::Configuration

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/walletone.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



24
25
26
27
28
29
30
# File 'lib/walletone.rb', line 24

def initialize
  self.logger = self.class.default_logger
  self.web_checkout_url = V2_CHECKOUT_URL
  self.error_notify_method = :notify
  self.error_notifier = Honeybadger if defined? Honeybadger
  self.error_notifier = Bugsnag if defined? Bugsnag
end

Instance Attribute Details

#error_notifierObject

Returns the value of attribute error_notifier.



16
17
18
# File 'lib/walletone.rb', line 16

def error_notifier
  @error_notifier
end

#error_notify_methodObject

Returns the value of attribute error_notify_method.



16
17
18
# File 'lib/walletone.rb', line 16

def error_notify_method
  @error_notify_method
end

#loggerObject

Returns the value of attribute logger.



16
17
18
# File 'lib/walletone.rb', line 16

def logger
  @logger
end

#web_checkout_urlObject

Returns the value of attribute web_checkout_url.



16
17
18
# File 'lib/walletone.rb', line 16

def web_checkout_url
  @web_checkout_url
end

Class Method Details

.default_loggerObject



18
19
20
21
22
# File 'lib/walletone.rb', line 18

def self.default_logger
  logger = Logger.new(STDOUT)
  logger.progname = 'walletone'
  logger
end