Class: RightAws::Ec2::QEc2DescribeImagesParser

Inherits:
RightAWSParser show all
Defined in:
lib/ec2/right_ec2.rb

Overview

:nodoc:

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



940
941
942
# File 'lib/ec2/right_ec2.rb', line 940

def reset
  @result = []
end

#tagend(name) ⇒ Object



929
930
931
932
933
934
935
936
937
938
939
# File 'lib/ec2/right_ec2.rb', line 929

def tagend(name)
  case name
    when 'imageId'       ; @image.imageId       = @text
    when 'imageLocation' ; @image.imageLocation = @text
    when 'imageState'    ; @image.imageState    = @text
    when 'imageOwnerId'  ; @image.imageOwnerId  = @text
    when 'isPublic'      ; @image.isPublic      = @text == 'true' ? true : false
    when 'productCode'   ; (@image.productCodes ||= []) << @text
    when 'item'          ; @result << @image if @xmlpath[%r{.*/imagesSet$}]
  end
end

#tagstart(name, attributes) ⇒ Object



924
925
926
927
928
# File 'lib/ec2/right_ec2.rb', line 924

def tagstart(name, attributes)
  if name == 'item' && @xmlpath[%r{.*/imagesSet$}]
    @image = QEc2DescribeImagesResponseItemType.new 
  end
end