class Faraday::Builder::Handler

borrowed from ActiveSupport::Dependencies::Reference & ActionDispatch::MiddlewareStack::Middleware

Attributes

name[R]

Public Class Methods

new(klass, *args, &block) click to toggle source
# File lib/faraday/builder.rb, line 23
def initialize(klass, *args, &block)
  @name = klass.to_s
  @@constants[@name] = klass if klass.respond_to?(:name)
  @args, @block = args, block
end

Public Instance Methods

==(other) click to toggle source
# File lib/faraday/builder.rb, line 32
def ==(other)
  if other.is_a? Handler
    self.name == other.name
  elsif other.respond_to? :name
    klass == other
  else
    @name == other.to_s
  end
end
build(app) click to toggle source
# File lib/faraday/builder.rb, line 42
def build(app)
  klass.new(app, *@args, &@block)
end
inspect() click to toggle source
# File lib/faraday/builder.rb, line 30
def inspect() @name end
klass() click to toggle source
# File lib/faraday/builder.rb, line 29
def klass() @@constants[@name] end