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:



444
445
446
# File 'lib/sqs/sqs_interface.rb', line 444

def reset
  @result = []
end

#tagend(name) ⇒ Object



452
453
454
455
456
457
458
459
460
461
462
463
# File 'lib/sqs/sqs_interface.rb', line 452

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



448
449
450
# File 'lib/sqs/sqs_interface.rb', line 448

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