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



2011
2012
2013
# File 'lib/ec2/ec2.rb', line 2011

def reset
  @result = []
end

#tagend(name) ⇒ Object



1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
# File 'lib/ec2/ec2.rb', line 1988

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:



1984
1985
1986
# File 'lib/ec2/ec2.rb', line 1984

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