Class: Cellular::Jobs::AsyncMessenger

Inherits:
ActiveJob::Base
  • Object
show all
Defined in:
lib/cellular/jobs/async_messenger.rb

Overview

Delivers SMSs asynchronously through ActiveJob

Instance Method Summary collapse

Instance Method Details

#perform(sms_options) ⇒ Object



7
8
9
10
11
12
13
14
# File 'lib/cellular/jobs/async_messenger.rb', line 7

def perform(sms_options)
  sms_options.keys.each do |key|
    sms_options[key.to_sym] = sms_options.delete key
  end

  sms = Cellular::SMS.new sms_options
  sms.deliver
end