Class: RightAws::Ec2::QEc2DescribeAccountAttributesParser

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

Overview


PARSERS: Account

Constant Summary

Constants inherited from RightAWSParser

RightAWSParser::DEFAULT_XML_LIBRARY

Instance Attribute Summary

Attributes inherited from RightAWSParser

#full_tag_name, #result, #tag, #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



626
627
628
# File 'lib/ec2/right_ec2.rb', line 626

def reset
  @result = {}
end

#tagend(name) ⇒ Object



619
620
621
622
623
624
625
# File 'lib/ec2/right_ec2.rb', line 619

def tagend(name)
  case name
  when 'attributeName'     then @name    = @text
  when 'attributeValue'    then @values << @text
  when 'attributeValueSet' then @result[@name] = (@values.size == 1) ? @values.first : @values
  end
end

#tagstart(name, attributes) ⇒ Object

:nodoc:



614
615
616
617
618
# File 'lib/ec2/right_ec2.rb', line 614

def tagstart(name, attributes)
  case name
  when 'attributeValueSet' then @values = []
  end
end