Class: HttpRouter::Node::Root

Inherits:
HttpRouter::Node show all
Defined in:
lib/http_router/node/root.rb

Instance Attribute Summary (collapse)

Attributes inherited from HttpRouter::Node

#node_position, #parent, #priority, #router

Instance Method Summary (collapse)

Methods inherited from HttpRouter::Node

#add_arbitrary, #add_destination, #add_free_match, #add_glob, #add_glob_regexp, #add_lookup, #add_match, #add_request, #add_spanning_match, #add_variable, #usable?

Constructor Details

- (Root) initialize(router)

A new instance of Root



5
6
7
8
# File 'lib/http_router/node/root.rb', line 5

def initialize(router)
  super(router, nil)
  @methods_module = Module.new
end

Instance Attribute Details

- (Object) methods_module (readonly)

Returns the value of attribute methods_module



4
5
6
# File 'lib/http_router/node/root.rb', line 4

def methods_module
  @methods_module
end

Instance Method Details

- (Object) [](request)



10
11
12
13
# File 'lib/http_router/node/root.rb', line 10

def [](request)
  compile
  self[request]
end