Class: Aws::Ec2::QEc2DescribeSnapshotsParser

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



2048
2049
2050
# File 'lib/ec2/ec2.rb', line 2048

def reset
  @result = []
end

#tagend(name) ⇒ Object



2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
# File 'lib/ec2/ec2.rb', line 2025

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 'description' then
      @snapshot[:aws_description] = @text
    when 'ownerId' then
      @snapshot[:aws_owner] = @text
    when 'volumeSize' then
      @snapshot[:aws_volume_size] = @text.to_i
    when 'item' then
      @result << @snapshot
  end
end

#tagstart(name, attributes) ⇒ Object

:nodoc:



2021
2022
2023
# File 'lib/ec2/ec2.rb', line 2021

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