Module: Doze::Router::ClassMethods
Instance Method Summary
collapse
#expand_route_template, #get_route, #partially_expand_route_template, #perform_routing_with_parent, #propagate_static_routes, #route_template
Instance Method Details
#route(*p, &b) ⇒ Object
93
94
95
|
# File 'lib/doze/router.rb', line 93
def route(*p, &b)
routes.route(*p, &b)
end
|
#router_uri_prefix ⇒ Object
78
79
80
81
|
# File 'lib/doze/router.rb', line 78
def router_uri_prefix
return @router_uri_prefix if defined?(@router_uri_prefix)
@router_uri_prefix = (superclass.respond_to?(:router_uri_prefix) ? superclass.router_uri_prefix : nil)
end
|
#router_uri_prefix=(uri) ⇒ Object
83
84
85
86
87
|
# File 'lib/doze/router.rb', line 83
def router_uri_prefix=(uri)
@router_uri_prefix = uri
module_eval("def uri; self.class.router_uri_prefix; end", __FILE__, __LINE__)
module_eval("def router_uri_prefix; self.class.router_uri_prefix; end", __FILE__, __LINE__)
end
|
#routes ⇒ Object
89
90
91
|
# File 'lib/doze/router.rb', line 89
def routes
@routes ||= (superclass.respond_to?(:routes) ? superclass.routes.dup : Doze::Router::RouteSet.new)
end
|