Methods
#
A
B
I
K
N
Attributes
[R] args
[R] block
Class Public methods
new(klass, *args, &block)
# File actionpack/lib/action_controller/middleware_stack.rb, line 4
def self.new(klass, *args, &block)
  if klass.is_a?(self)
    klass
  else
    super
  end
end
new(klass, *args, &block)
# File actionpack/lib/action_controller/middleware_stack.rb, line 14
def initialize(klass, *args, &block)
  @klass = klass
  options = args.extract_options!
  if options.has_key?(:if)
    @conditional = options.delete(:if)
  else
    @conditional = true
  end
  args << options unless options.empty?
  @args = args
  @block = block
end
Instance Public methods
==(middleware)
# File actionpack/lib/action_controller/middleware_stack.rb, line 51
def ==(middleware)
  case middleware
  when Middleware
    klass == middleware.klass
  when Class
    klass == middleware
  else
    klass == middleware.to_s.constantize
  end
end
active?()
# File actionpack/lib/action_controller/middleware_stack.rb, line 41
def active?
  return false unless klass
  if @conditional.respond_to?(:call)
    @conditional.call
  else
    @conditional
  end
end
build(app)
# File actionpack/lib/action_controller/middleware_stack.rb, line 68
def build(app)
  if block
    klass.new(app, *build_args, &block)
  else
    klass.new(app, *build_args)
  end
end
inspect()
# File actionpack/lib/action_controller/middleware_stack.rb, line 62
def inspect
  str = klass.to_s
  args.each { |arg| str += ", #{arg.inspect}" }
  str
end
klass()
# File actionpack/lib/action_controller/middleware_stack.rb, line 29
def klass
  if @klass.respond_to?(:call)
    @klass.call
  elsif @klass.is_a?(Class)
    @klass
  else
    @klass.to_s.constantize
  end
rescue NameError
  @klass
end