class Midori::Route

Class for Midori route @attr [String] method HTTP method @attr [Regexp] path regex to match @attr [Proc] function what to do after matched @attr [Array<Class>] middlewares middlewares used in the route

Attributes

function[RW]
method[RW]
middlewares[RW]
path[RW]

Public Class Methods

new(method, path, function) click to toggle source

Define a route @param [String] method HTTP method @param [Regexp] path regex to match @param [Proc] function what to do after matched

# File lib/midori/route.rb, line 14
def initialize(method, path, function)
  @method = method
  @path = path
  @function = function
  @middlewares = []
end