Sha256: 74e374b7c24058566ee6d40f0c729cf77f6cab85d516f73c9d2a537bdfd6e8fa
Contents?: true
Size: 501 Bytes
Versions: 21
Compression:
Stored size: 501 Bytes
Contents
module Fog class Connection def initialize(url) @excon = Excon.new(url) end def request(params, &block) unless block_given? if (parser = params.delete(:parser)) body = Nokogiri::XML::SAX::PushParser.new(parser) block = lambda { |chunk| body << chunk } end end response = @excon.request(params, &block) if parser body.finish response.body = parser.response end response end end end
Version data entries
21 entries across 21 versions & 1 rubygems