Sha256: cab4aea0b9edf47624adafb15bb3e576b07083a4f7d24066d91ed58a74ef32ac
Contents?: true
Size: 476 Bytes
Versions: 61
Compression:
Stored size: 476 Bytes
Contents
# frozen_string_literal: true require_relative "session" module HTTPX class Session def initialize(options = EMPTY_HASH, &blk) @options = self.class.default_options.merge(options) @responses = {} @persistent = @options.persistent wrap(&blk) if blk end def wrap begin prev_persistent = @persistent @persistent = true yield self ensure @persistent = prev_persistent end end end end
Version data entries
61 entries across 61 versions & 1 rubygems