Class: Awsum::Ec2::RegisterImageParser

Inherits:
Parser show all
Defined in:
lib/ec2/image.rb

Overview

:nodoc:

Instance Method Summary collapse

Methods inherited from Parser

#parse, #xmldecl

Constructor Details

#initialize(ec2) ⇒ RegisterImageParser

Returns a new instance of RegisterImageParser.



131
132
133
134
135
# File 'lib/ec2/image.rb', line 131

def initialize(ec2)
  @ec2 = ec2
  @image = nil
  @text = nil
end

Instance Method Details

#resultObject



156
157
158
# File 'lib/ec2/image.rb', line 156

def result
  @image
end

#tag_end(tag) ⇒ Object



148
149
150
151
152
153
154
# File 'lib/ec2/image.rb', line 148

def tag_end(tag)
  case tag
    when 'imageId'
      @image = @text
      @text = nil
  end
end

#tag_start(tag, attributes) ⇒ Object



137
138
139
140
141
142
# File 'lib/ec2/image.rb', line 137

def tag_start(tag, attributes)
  case tag
    when 'imageId'
      @text = ''
  end
end

#text(text) ⇒ Object



144
145
146
# File 'lib/ec2/image.rb', line 144

def text(text)
  @text << text unless @text.nil?
end