Class: WhatsAppNotifier::Providers::Base
- Inherits:
-
Object
- Object
- WhatsAppNotifier::Providers::Base
- Defined in:
- lib/whatsapp_notifier/providers/base.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#configuration ⇒ Object
readonly
Returns the value of attribute configuration.
Instance Method Summary collapse
- #connection_status(metadata: {}) ⇒ Object
- #deliver(_payload) ⇒ Object
-
#initialize(configuration:) ⇒ Base
constructor
A new instance of Base.
- #scan_qr(metadata: {}) ⇒ Object
Constructor Details
#initialize(configuration:) ⇒ Base
Returns a new instance of Base.
6 7 8 |
# File 'lib/whatsapp_notifier/providers/base.rb', line 6 def initialize(configuration:) @configuration = configuration end |
Instance Attribute Details
#configuration ⇒ Object (readonly)
Returns the value of attribute configuration.
4 5 6 |
# File 'lib/whatsapp_notifier/providers/base.rb', line 4 def configuration @configuration end |
Instance Method Details
#connection_status(metadata: {}) ⇒ Object
18 19 20 |
# File 'lib/whatsapp_notifier/providers/base.rb', line 18 def connection_status(metadata: {}) raise NotImplementedError, "#{self.class.name} does not support status checking" end |
#deliver(_payload) ⇒ Object
10 11 12 |
# File 'lib/whatsapp_notifier/providers/base.rb', line 10 def deliver(_payload) raise NotImplementedError, "#{self.class.name} must implement #deliver" end |
#scan_qr(metadata: {}) ⇒ Object
14 15 16 |
# File 'lib/whatsapp_notifier/providers/base.rb', line 14 def scan_qr(metadata: {}) raise NotImplementedError, "#{self.class.name} does not support QR scanning" end |