Class: ActionController::MiddlewareStack::Middleware

Inherits:
ActionDispatch::MiddlewareStack::Middleware show all
Defined in:
lib/action_controller/metal.rb

Overview

:nodoc:

Instance Attribute Summary

Attributes inherited from ActionDispatch::MiddlewareStack::Middleware

#args, #block, #klass

Instance Method Summary collapse

Methods inherited from ActionDispatch::MiddlewareStack::Middleware

#==, #build, #build_instrumented, #inspect, #name

Constructor Details

#initialize(klass, args, actions, strategy, block) ⇒ Middleware

:nodoc:



20
21
22
23
24
# File 'lib/action_controller/metal.rb', line 20

def initialize(klass, args, actions, strategy, block)
  @actions = actions
  @strategy = strategy
  super(klass, args, block)
end

Instance Method Details

#valid?(action) ⇒ Boolean

Returns:

  • (Boolean)


26
27
28
# File 'lib/action_controller/metal.rb', line 26

def valid?(action)
  @strategy.call @actions, action
end