Class: SmsGateway::Adapters::BetterOpener
- Inherits:
-
Object
- Object
- SmsGateway::Adapters::BetterOpener
- Defined in:
- lib/better_opener/sms_gateway_adapter.rb
Instance Method Summary collapse
-
#initialize(config = {}) ⇒ BetterOpener
constructor
A new instance of BetterOpener.
- #send_sms(sms) ⇒ Object
Constructor Details
#initialize(config = {}) ⇒ BetterOpener
Returns a new instance of BetterOpener.
8 9 10 11 |
# File 'lib/better_opener/sms_gateway_adapter.rb', line 8 def initialize(config={}) @config = {:from => SmsGateway::Base.from } @config.merge!(config) end |
Instance Method Details
#send_sms(sms) ⇒ Object
13 14 15 16 |
# File 'lib/better_opener/sms_gateway_adapter.rb', line 13 def send_sms(sms) = @config.merge({:to => sms.to, :message => sms.text }) ::BetterOpener.add_notification("sms", sms.from, ::BetterOpener.render_sms('sms', sms) ) end |