Class: TBK::Webpay::Logger::BaseLogger
- Inherits:
-
Object
- Object
- TBK::Webpay::Logger::BaseLogger
- Defined in:
- lib/tbk/webpay/logger/base_logger.rb
Overview
This is an abstract class that defines the required interface of a Webpay logger
Direct Known Subclasses
Instance Method Summary collapse
-
#confirmation(confirmation) ⇒ Object
Abstract method to log a payment confirmation.
-
#initialize(&block) ⇒ BaseLogger
constructor
Allow logger customization with a block.
-
#payment(payment) ⇒ Object
Abstract method to log a payment.
Constructor Details
#initialize(&block) ⇒ BaseLogger
Allow logger customization with a block
8 9 10 11 |
# File 'lib/tbk/webpay/logger/base_logger.rb', line 8 def initialize(&block) block.call(self) if block validate! end |
Instance Method Details
#confirmation(confirmation) ⇒ Object
Abstract method to log a payment confirmation
19 20 21 |
# File 'lib/tbk/webpay/logger/base_logger.rb', line 19 def confirmation(confirmation) raise NotImplementedError, "TBK::Webpay::Logger::BaseLogger subclass must implement #confirmation method" end |
#payment(payment) ⇒ Object
Abstract method to log a payment
14 15 16 |
# File 'lib/tbk/webpay/logger/base_logger.rb', line 14 def payment(payment) raise NotImplementedError, "TBK::Webpay::Logger::BaseLogger subclass must implement #payment method" end |