class HttpRouter::Node::Glob
Public Instance Methods
to_code()
click to toggle source
# File lib/http_router/node/glob.rb, line 9 def to_code id = root.next_counter "request.params << (globbed_params#{id} = []) until request.path.empty? globbed_params#{id} << request.path.shift #{super} end request.path[0,0] = globbed_params#{id}" end
Also aliased as: node_to_code
usable?(other)
click to toggle source
# File lib/http_router/node/glob.rb, line 5 def usable?(other) other.class == self.class end