Class: WhatsAppNotifier::Providers::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/whatsapp_notifier/providers/base.rb

Direct Known Subclasses

WebAutomation

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#configurationObject (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

Raises:

  • (NotImplementedError)


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

Raises:

  • (NotImplementedError)


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

Raises:

  • (NotImplementedError)


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