Class: ActionShortMessage::SMSProviders::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/action_short_message/sms_providers/base.rb

Direct Known Subclasses

Test

Instance Method Summary collapse

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 send_message(_message, _params = {})
  # raise ArgumentError, 'You should provide at least one phone for sending messages' unless senders.present?

  # @from = pick_sender
end

#sendersObject



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