Class: ActiveSms::ConnectionAdapters::AbstractAdapter

Inherits:
Object
  • Object
show all
Defined in:
lib/activesms/connection_adapters/abstract_adapter.rb

Overview

All the concrete gateway adapters follow the interface laid down in this class. You can use this interface directly by borrowing the gateway connection from the Base with Base.connection.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(logger = nil) ⇒ AbstractAdapter

:nodoc:



13
14
15
# File 'lib/activesms/connection_adapters/abstract_adapter.rb', line 13

def initialize(logger = nil) #:nodoc:
  @logger = logger
end

Instance Attribute Details

#loggerObject

Returns the value of attribute logger.



11
12
13
# File 'lib/activesms/connection_adapters/abstract_adapter.rb', line 11

def logger
  @logger
end

Instance Method Details

#adapter_nameObject

Return the human readable name of the gateway adapter.



18
19
20
# File 'lib/activesms/connection_adapters/abstract_adapter.rb', line 18

def adapter_name
  return 'Abstract'
end

#deliver(sms) ⇒ Object



22
23
# File 'lib/activesms/connection_adapters/abstract_adapter.rb', line 22

def deliver(sms)
end

#parse(sms) ⇒ Object



25
26
27
# File 'lib/activesms/connection_adapters/abstract_adapter.rb', line 25

def parse(sms)
  nil
end