Class: RightAws::Ec2::QEc2TerminateInstancesParser

Inherits:
RightAWSParser show all
Defined in:
lib/ec2/right_ec2_instances.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



663
664
665
# File 'lib/ec2/right_ec2_instances.rb', line 663

def reset
  @result = []
end

#tagend(name) ⇒ Object



653
654
655
656
657
658
659
660
661
662
# File 'lib/ec2/right_ec2_instances.rb', line 653

def tagend(name)
  case full_tag_name
  when %r{/instanceId$}         then @instance[:aws_instance_id]        = @text
  when %r{/currentState/code$}  then @instance[:aws_current_state_code] = @text.to_i
  when %r{/currentState/name$}  then @instance[:aws_current_state_name] = @text
  when %r{/previousState/code$} then @instance[:aws_prev_state_code]    = @text.to_i
  when %r{/previousState/name$} then @instance[:aws_prev_state_name]    = @text
  when %r{/item$}               then @result << @instance
  end
end

#tagstart(name, attributes) ⇒ Object



650
651
652
# File 'lib/ec2/right_ec2_instances.rb', line 650

def tagstart(name, attributes)
  @instance = {} if name == 'item'
end