class Mblox::SmsResponse::Result
Constants
- UNROUTABLE
- UNROUTABLE_TEXT
Attributes
code[R]
text[R]
Public Class Methods
from_xml(xml, xpath)
click to toggle source
# File lib/mblox/sms_response.rb, line 24 def self.from_xml(xml, xpath) code, text = xml.xpath("//#{xpath}Code"), xml.xpath("//#{xpath}Text") new(code.first.child.content, text.first.child.content) end
new(code, text)
click to toggle source
# File lib/mblox/sms_response.rb, line 20 def initialize(code, text) @code, @text = (code.to_i.to_s == code ? code.to_i : code), text end
Public Instance Methods
==(rhs)
click to toggle source
# File lib/mblox/sms_response.rb, line 33 def ==(rhs) code == rhs.code && text == rhs.text end
ok?()
click to toggle source
# File lib/mblox/sms_response.rb, line 29 def ok? 0 == @code end