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



457
458
459
460
# File 'lib/ec2/right_ec2_ebs.rb', line 457

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

#tagend(name) ⇒ Object



451
452
453
454
455
456
# File 'lib/ec2/right_ec2_ebs.rb', line 451

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



446
447
448
449
450
# File 'lib/ec2/right_ec2_ebs.rb', line 446

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