Class: RightAws::Ec2::QEc2DescribeSnapshotsParser

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

Overview


PARSERS: EBS - Snapshots

Constant Summary

Constants inherited from RightAWSParser

RightAWSParser::DEFAULT_XML_LIBRARY

Instance Attribute Summary

Attributes inherited from RightAWSParser

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



1715
1716
1717
# File 'lib/ec2/right_ec2.rb', line 1715

def reset
  @result = []
end

#tagend(name) ⇒ Object



1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
# File 'lib/ec2/right_ec2.rb', line 1705

def tagend(name)
  case name 
    when 'volumeId'   then @snapshot[:aws_volume_id]  = @text
    when 'snapshotId' then @snapshot[:aws_id]         = @text
    when 'status'     then @snapshot[:aws_status]     = @text
    when 'startTime'  then @snapshot[:aws_started_at] = Time.parse(@text)
    when 'progress'   then @snapshot[:aws_progress]   = @text
    when 'item'       then @result                   << @snapshot
  end
end

#tagstart(name, attributes) ⇒ Object

:nodoc:



1702
1703
1704
# File 'lib/ec2/right_ec2.rb', line 1702

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