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.



7
8
9
# File 'lib/fog/parser.rb', line 7

def initialize
  reset
end

Instance Attribute Details

#responseObject (readonly)

Returns the value of attribute response.



5
6
7
# File 'lib/fog/parser.rb', line 5

def response
  @response
end

Instance Method Details

#characters(string) ⇒ Object



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

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

#resetObject



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

def reset
  @response = {}
end

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



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

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