Exception: ActiveSms::SmsInvalid

Inherits:
ActiveSmsError show all
Defined in:
lib/activesms/validations.rb

Overview

The SMS message object is invalid. Use the sms method to retrieve the message which did not validate.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(sms) ⇒ SmsInvalid

Returns a new instance of SmsInvalid.



6
7
8
9
# File 'lib/activesms/validations.rb', line 6

def initialize(sms)
  @sms = sms
  super("Validation failed: #{@sms.errors.full_messages.join(', ')}")
end

Instance Attribute Details

#smsObject (readonly)

Returns the value of attribute sms.



5
6
7
# File 'lib/activesms/validations.rb', line 5

def sms
  @sms
end