Class: RightAws::Ec2::QEc2DescribeImagesParser

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

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



909
910
911
# File 'lib/ec2/right_ec2.rb', line 909

def reset
  @result = []
end

#tagend(name) ⇒ Object



898
899
900
901
902
903
904
905
906
907
908
# File 'lib/ec2/right_ec2.rb', line 898

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



893
894
895
896
897
# File 'lib/ec2/right_ec2.rb', line 893

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