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.



27
28
29
30
31
32
33
# File 'lib/walletone.rb', line 27

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.



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

def error_notifier
  @error_notifier
end

#error_notify_methodObject

Returns the value of attribute error_notify_method.



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

def error_notify_method
  @error_notify_method
end

#loggerObject

Returns the value of attribute logger.



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

def logger
  @logger
end

#web_checkout_urlObject

Returns the value of attribute web_checkout_url.



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

def web_checkout_url
  @web_checkout_url
end

Class Method Details

.default_loggerObject



21
22
23
24
25
# File 'lib/walletone.rb', line 21

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