Class: ActionShortMessage::SMSProviders::Base
- Inherits:
-
Object
- Object
- ActionShortMessage::SMSProviders::Base
- Defined in:
- lib/action_short_message/sms_providers/base.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ Base
constructor
A new instance of Base.
- #send_message(_message, _params = {}) ⇒ Object
- #senders ⇒ Object
Constructor Details
#initialize(params = {}) ⇒ Base
Returns a new instance of Base.
4 5 6 |
# File 'lib/action_short_message/sms_providers/base.rb', line 4 def initialize(params = {}) @params = params end |
Instance Method Details
#send_message(_message, _params = {}) ⇒ Object
8 9 10 11 12 |
# File 'lib/action_short_message/sms_providers/base.rb', line 8 def (, _params = {}) # raise ArgumentError, 'You should provide at least one phone for sending messages' unless senders.present? # @from = pick_sender end |
#senders ⇒ Object
14 15 16 |
# File 'lib/action_short_message/sms_providers/base.rb', line 14 def senders @senders ||= @params[:from].present? ? @params[:from] : ActionShortMessage::Base.default_params[:from] end |