Class: Rack::Delegate::ConstrainedAction

Inherits:
Struct
  • Object
show all
Defined in:
lib/rack/delegate/constrained_action.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#actionObject

Returns the value of attribute action

Returns:

  • (Object)

    the current value of action



3
4
5
# File 'lib/rack/delegate/constrained_action.rb', line 3

def action
  @action
end

#constraintsObject

Returns the value of attribute constraints

Returns:

  • (Object)

    the current value of constraints



3
4
5
# File 'lib/rack/delegate/constrained_action.rb', line 3

def constraints
  @constraints
end

Instance Method Details

#dispatch(request) ⇒ Object



4
5
6
7
8
# File 'lib/rack/delegate/constrained_action.rb', line 4

def dispatch(request)
  if appropriate?(request)
    action.dispatch(request)
  end
end