Class: Rack::Delegate::Action

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#delegatorObject

Returns the value of attribute delegator

Returns:

  • (Object)

    the current value of delegator



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

def delegator
  @delegator
end

#patternObject

Returns the value of attribute pattern

Returns:

  • (Object)

    the current value of pattern



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

def pattern
  @pattern
end

Instance Method Details

#dispatch(request) ⇒ Object



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

def dispatch(request)
  pattern.match(request.fullpath) do
    throw :dispatched, delegator
  end
end