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



1838
1839
1840
# File 'lib/ec2/right_ec2.rb', line 1838

def reset
  @result = []
end

#tagend(name) ⇒ Object



1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
# File 'lib/ec2/right_ec2.rb', line 1828

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:



1825
1826
1827
# File 'lib/ec2/right_ec2.rb', line 1825

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