class BabySMS::FailedDelivery
A FailedDelivery
being raised means your message didn't get sent. This can be because of a single error, or multiple failed attempts.
A FailedDelivery
may contain multiple “sub-exceptions” in exception that can be inspected to determine what happened.
Attributes
adapter[R]
exceptions[R]
Public Class Methods
multiple(exceptions)
click to toggle source
# File lib/babysms/errors.rb, line 21 def self.multiple(exceptions) # We don't want to give a public interface to setting exceptions BabySMS::FailedDelivery.new("multiple exceptions").itself do |result| result.instance_variable_set(:@exceptions, exceptions) end end
new(*args, adapter: nil)
click to toggle source
Calls superclass method
# File lib/babysms/errors.rb, line 14 def initialize(*args, adapter: nil) super(*args) @adapter = adapter @exceptions = [self] end
Public Instance Methods
multiple?()
click to toggle source
# File lib/babysms/errors.rb, line 28 def multiple? exceptions.size > 1 end