Class: ActiveSMS::Backend::Base
- Inherits:
-
Object
- Object
- ActiveSMS::Backend::Base
- Defined in:
- lib/active_sms/backend/base.rb
Overview
Base class for any sms provider service. Provides basic structure and helper methods. While not necessary to be subclassed now, may be necessary later.
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ Base
constructor
In initializer you may accept secrets which were defined in initializer or other configuration options if any.
-
#send_sms(_phone, _text) ⇒ Object
Interface for sending sms.
Constructor Details
#initialize(params = {}) ⇒ Base
In initializer you may accept secrets which were defined in initializer or other configuration options if any.
11 12 |
# File 'lib/active_sms/backend/base.rb', line 11 def initialize(params = {}) end |
Instance Method Details
#send_sms(_phone, _text) ⇒ Object
Interface for sending sms. Every subclass should implement method itself. Raises error in default implementation.
20 21 22 23 |
# File 'lib/active_sms/backend/base.rb', line 20 def send_sms(_phone, _text) raise NotImplementedError, "You should create your own class for every sms service you use" end |