1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00
fog--fog/lib/fog/parser.rb

27 lines
385 B
Ruby
Raw Normal View History

2009-05-19 02:06:49 -04:00
module Fog
module Parsers
class Base < Nokogiri::XML::SAX::Document
attr_reader :response
2009-05-19 02:06:49 -04:00
def initialize
reset
end
def reset
@response = {}
2009-05-19 02:06:49 -04:00
end
def characters(string)
@value ||= ''
2009-05-19 02:06:49 -04:00
@value << string.strip
end
def start_element(name, attrs = [])
@value = nil
2009-05-19 02:06:49 -04:00
end
end
end
end