class Fog::XML::Response
Public Class Methods
Source
# File lib/fog/xml/response.rb, line 4 def initialize(parser) @parser = parser @data_stream = Nokogiri::XML::SAX::PushParser.new(parser) @response_string = "" end
Public Instance Methods
Source
# File lib/fog/xml/response.rb, line 10 def call(chunk, _remaining, _total) @response_string << chunk if ENV["DEBUG_RESPONSE"] @data_stream << chunk end
Source
# File lib/fog/xml/response.rb, line 20 def finish Fog::Logger.debug "\n#{@response_string}" if ENV["DEBUG_RESPONSE"] @data_stream.finish end
Source
# File lib/fog/xml/response.rb, line 15 def rewind @parser.reset @response_string = "" end