Sha256: 46d874a2f66038bc3826a16c94c30fed4aa31d915d282657626bdc6c82c2b780

Contents?: true

Size: 578 Bytes

Versions: 33

Compression:

Stored size: 578 Bytes

Contents

##
# 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
class Midori::Route
  attr_accessor :method, :path, :function, :middlewares

  # Define a route
  # @param [String] method HTTP method
  # @param [Regexp] path regex to match
  # @param [Proc] function what to do after matched
  def initialize(method, path, function)
    @method = method
    @path = path
    @function = function
    @middlewares = []
  end
end

Version data entries

33 entries across 33 versions & 2 rubygems

Version Path
midori.rb-0.9.0 lib/midori/route.rb
midori.rb-0.8.0 lib/midori/route.rb
midori.rb-0.7.1 lib/midori/route.rb
midori.rb-0.7.0 lib/midori/route.rb
midori.rb-0.6.0 lib/midori/route.rb
midori.rb-0.5.4 lib/midori/route.rb
midori.rb-0.5.3.1 lib/midori/route.rb
midori.rb-0.5.3 lib/midori/route.rb
midori.rb-0.5.2 lib/midori/route.rb
midori.rb-0.5.1 lib/midori/route.rb
midori.rb-0.5.0 lib/midori/route.rb
midori.rb-0.4.4.1 lib/midori/route.rb
midori.rb-0.4.4 lib/midori/route.rb
midori.rb-0.4.3 lib/midori/route.rb
em-midori-0.4.3 lib/midori/route.rb
em-midori-0.4.2.1 lib/midori/route.rb
em-midori-0.4.2 lib/midori/route.rb
em-midori-0.4.1.1 lib/midori/route.rb
em-midori-0.4.1 lib/midori/route.rb
em-midori-0.4.0 lib/midori/route.rb