Class: RightAws::SqsGen2Interface::SqsReceiveMessageParser

Inherits:
RightAWSParser show all
Defined in:
lib/sqs/right_sqs_gen2_interface.rb

Overview


PARSERS: Messages

Constant Summary

Constants inherited from RightAWSParser

RightAWSParser::DEFAULT_XML_LIBRARY

Instance Attribute Summary

Attributes inherited from RightAWSParser

#result, #xml_lib, #xmlpath

Instance Method Summary collapse

Methods inherited from RightAWSParser

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

Constructor Details

This class inherits a constructor from RightAws::RightAWSParser

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class RightAws::RightAWSParser

Instance Method Details

#resetObject

:nodoc:



416
417
418
# File 'lib/sqs/right_sqs_gen2_interface.rb', line 416

def reset
  @result = []
end

#tagend(name) ⇒ Object



422
423
424
425
426
427
428
429
# File 'lib/sqs/right_sqs_gen2_interface.rb', line 422

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



419
420
421
# File 'lib/sqs/right_sqs_gen2_interface.rb', line 419

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