Class: RightAws::Ec2::QEc2DescribeSnapshotAttributeParser

Inherits:
RightAWSParser 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



443
444
445
446
# File 'lib/ec2/right_ec2_ebs.rb', line 443

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

#tagend(name) ⇒ Object



437
438
439
440
441
442
# File 'lib/ec2/right_ec2_ebs.rb', line 437

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



432
433
434
435
436
# File 'lib/ec2/right_ec2_ebs.rb', line 432

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