Class: Aws::Ec2::QEc2DescribeSnapshotsParser

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

Overview


PARSERS: EBS - Snapshots

Constant Summary

Constants inherited from AwsParser

AwsParser::DEFAULT_XML_LIBRARY

Instance Attribute Summary

Attributes inherited from AwsParser

#result, #xml_lib, #xmlpath

Instance Method Summary collapse

Methods inherited from AwsParser

#initialize, #method_missing, #parse, #tag_end, #tag_start, #tagtext, #text, xml_lib, xml_lib=

Constructor Details

This class inherits a constructor from Aws::AwsParser

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Aws::AwsParser

Instance Method Details

#resetObject



1828
1829
1830
# File 'lib/ec2/right_ec2.rb', line 1828

def reset
  @result = []
end

#tagend(name) ⇒ Object



1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
# File 'lib/ec2/right_ec2.rb', line 1818

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:



1815
1816
1817
# File 'lib/ec2/right_ec2.rb', line 1815

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