Module: SmsOnRails::ActsAsDeliverable::SingletonMethods

Defined in:
lib/sms_on_rails/activerecord_extensions/acts_as_deliverable.rb

Instance Method Summary collapse

Instance Method Details

#deliver(deliverables, options = {}) ⇒ Object

Deliver a list of deliverables

Parameters

  • deliverables - a deliverable or an array of deliverables

  • options - delivery options. Refer to individual delivery options

All messages(including failed status) are delivered unless a fatal exception occurs Specify :fatal_exception => nil to override this behavior



36
37
38
39
40
# File 'lib/sms_on_rails/activerecord_extensions/acts_as_deliverable.rb', line 36

def deliver(deliverables, options={})
  [deliverables].flatten.each do |deliverable|
    deliverable.deliver(options)
  end
end