Class: SMSBox::WebsendResponse

Inherits:
XMLResponse show all
Defined in:
lib/sms_box/websend_response.rb

Instance Attribute Summary collapse

Attributes inherited from XMLResponse

#command, #command_data, #error, #request, #requestUid

Instance Method Summary collapse

Methods inherited from XMLResponse

#error?, from_xml, instantize, #success?

Constructor Details

#initializeWebsendResponse

Returns a new instance of WebsendResponse.



6
7
8
9
# File 'lib/sms_box/websend_response.rb', line 6

def initialize
  super
  self.receiver_status = []
end

Instance Attribute Details

#receiver_statusObject

Returns the value of attribute receiver_status.



4
5
6
# File 'lib/sms_box/websend_response.rb', line 4

def receiver_status
  @receiver_status
end

Instance Method Details

#command_data=(command_nodeset) ⇒ Object



11
12
13
14
15
16
# File 'lib/sms_box/websend_response.rb', line 11

def command_data=(command_nodeset)
  super
  self.receiver_status = command_nodeset.xpath('receiver').map do |receiver|
    { :receiver => receiver.text, :status => receiver[:status] }
  end
end