Sha256: 25d050122c769cedbdfed100a73b809ca4296f4d9946583e2aaa91dd1b1c0110

Contents?: true

Size: 737 Bytes

Versions: 8

Compression:

Stored size: 737 Bytes

Contents

module Faraday
  class Middleware
    class << self
      attr_accessor :load_error, :supports_parallel_requests
      alias supports_parallel_requests? supports_parallel_requests

      # valid parallel managers should respond to #run with no parameters.
      # otherwise, return a short wrapper around it.
      def setup_parallel_manager(options = {})
        nil
      end
    end

    # Executes a block which should try to require and reference dependent libraries
    def self.dependency(lib = nil)
      lib ? require(lib) : yield
    rescue LoadError, NameError => error
      self.load_error = error
    end

    def self.loaded?
      @load_error.nil?
    end

    def initialize(app = nil)
      @app = app
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
faraday-0.7.5 lib/faraday/middleware.rb
faraday-0.7.4 lib/faraday/middleware.rb
faraday-0.7.3 lib/faraday/middleware.rb
faraday-0.7.2 lib/faraday/middleware.rb
faraday-0.7.1 lib/faraday/middleware.rb
faraday-0.7.0 lib/faraday/middleware.rb
faraday-0.6.1 lib/faraday/middleware.rb
faraday-0.6.0 lib/faraday/middleware.rb