class Faraday::RackBuilder::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/rack_builder.rb, line 26 def initialize(klass, *args, &block) @name = klass.to_s if klass.respond_to?(:name) @@constants_mutex.synchronize { @@constants[@name] = klass } end @args, @block = args, block end
Public Instance Methods
==(other)
click to toggle source
# File lib/faraday/rack_builder.rb, line 37 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/rack_builder.rb, line 47 def build(app) klass.new(app, *@args, &@block) end
inspect()
click to toggle source
# File lib/faraday/rack_builder.rb, line 35 def inspect() @name end
klass()
click to toggle source
# File lib/faraday/rack_builder.rb, line 34 def klass() @@constants[@name] end