Class: Fog::Parsers::Base

Inherits:
Nokogiri::XML::SAX::Document
  • Object
show all
Defined in:
lib/fog/parser.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeBase

Returns a new instance of Base.



12
13
14
# File 'lib/fog/parser.rb', line 12

def initialize
  reset
end

Instance Attribute Details

#responseObject (readonly)

Returns the value of attribute response.



10
11
12
# File 'lib/fog/parser.rb', line 10

def response
  @response
end

Instance Method Details

#characters(string) ⇒ Object



20
21
22
# File 'lib/fog/parser.rb', line 20

def characters(string)
  @value << string.strip
end

#resetObject



16
17
18
# File 'lib/fog/parser.rb', line 16

def reset
  @response = {}
end

#start_element(name, attrs = []) ⇒ Object



24
25
26
# File 'lib/fog/parser.rb', line 24

def start_element(name, attrs = [])
  @value = ''
end