Class: SmsTraffic::Client::Reply
- Inherits:
-
Object
- Object
- SmsTraffic::Client::Reply
- Defined in:
- lib/sms_traffic/client/reply.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#hash ⇒ Object
readonly
Returns the value of attribute hash.
-
#xml ⇒ Object
readonly
Returns the value of attribute xml.
Instance Method Summary collapse
-
#initialize(xml, xml_parser: SmsTraffic.configuration.xml_parser) ⇒ Reply
constructor
A new instance of Reply.
Constructor Details
#initialize(xml, xml_parser: SmsTraffic.configuration.xml_parser) ⇒ Reply
Returns a new instance of Reply.
6 7 8 9 |
# File 'lib/sms_traffic/client/reply.rb', line 6 def initialize(xml, xml_parser: SmsTraffic.configuration.xml_parser) @xml = xml.gsub!(/\s+/, ' ') @hash = fetch_value(xml_parser.parse(xml), :reply) end |
Instance Attribute Details
#hash ⇒ Object (readonly)
Returns the value of attribute hash.
4 5 6 |
# File 'lib/sms_traffic/client/reply.rb', line 4 def hash @hash end |
#xml ⇒ Object (readonly)
Returns the value of attribute xml.
4 5 6 |
# File 'lib/sms_traffic/client/reply.rb', line 4 def xml @xml end |