Class: RightAws::Ec2::QEc2DescribeSnapshotAttributeParser

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

Overview

:nodoc:

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



506
507
508
509
# File 'lib/ec2/right_ec2_ebs.rb', line 506

def reset
  @create_volume_permission = "DescribeSnapshotAttributeResponse/createVolumePermission/item"
  @result = {}
end

#tagend(name) ⇒ Object



500
501
502
503
504
505
# File 'lib/ec2/right_ec2_ebs.rb', line 500

def tagend(name)
  case full_tag_name
  when "#{@create_volume_permission}/group"  then @result[:create_volume_permission][:groups] << @text
  when "#{@create_volume_permission}/userId" then @result[:create_volume_permission][:users]  << @text
  end
end

#tagstart(name, attributes) ⇒ Object



495
496
497
498
499
# File 'lib/ec2/right_ec2_ebs.rb', line 495

def tagstart(name, attributes)
  case name
  when 'createVolumePermission' then @result[:create_volume_permission] = { :groups => [], :users => [] }
  end
end