Class: Midori::Route

Inherits:
Object
  • Object
show all
Defined in:
lib/em-midori/route.rb

Overview

Class for Midori route

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(method, path, function) ⇒ Route


12
13
14
15
16
# File 'lib/em-midori/route.rb', line 12

def initialize(method, path, function)
  @method = method
  @path = path
  @function = function
end

Instance Attribute Details

#functionProc

what to do after matched


6
7
8
# File 'lib/em-midori/route.rb', line 6

def function
  @function
end

#methodString

HTTP method


6
7
8
# File 'lib/em-midori/route.rb', line 6

def method
  @method
end

#pathRegexp

regex to match


6
7
8
# File 'lib/em-midori/route.rb', line 6

def path
  @path
end