Class: Aws::SqsInterface::SqsReceiveMessageParser

Inherits:
AwsParser show all
Defined in:
lib/sqs/sqs_interface.rb

Overview


PARSERS: Messages

Constant Summary

Constants inherited from AwsParser

AwsParser::DEFAULT_XML_LIBRARY

Instance Attribute Summary

Attributes inherited from AwsParser

#result, #xml_lib, #xmlpath

Instance Method Summary collapse

Methods inherited from AwsParser

#initialize, #method_missing, #parse, #tag_end, #tag_start, #tagtext, #text, xml_lib, xml_lib=

Constructor Details

This class inherits a constructor from Aws::AwsParser

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Aws::AwsParser

Instance Method Details

#resetObject

:nodoc:



410
411
412
# File 'lib/sqs/sqs_interface.rb', line 410

def reset
  @result = []
end

#tagend(name) ⇒ Object



416
417
418
419
420
421
422
423
# File 'lib/sqs/sqs_interface.rb', line 416

def tagend(name)
  case name
  when 'MessageId'  ; @current_message['MessageId'] = @text
  when 'ReceiptHandle' ; @current_message['ReceiptHandle'] = @text
  when 'MD5OfBody' ; @current_message['MD5OfBody'] = @text
  when 'Body'; @current_message['Body'] = @text; @result << @current_message
  end
end

#tagstart(name, attributes) ⇒ Object



413
414
415
# File 'lib/sqs/sqs_interface.rb', line 413

def tagstart(name, attributes)
  @current_message = {} if name == 'Message'
end