Module: Simple::Httpd::RouteDescriptions
- Defined in:
- lib/simple/httpd/route.rb
Instance Method Summary collapse
-
#describe_route!(route) ⇒ Object
Adds a route description.
-
#route_descriptions ⇒ Object
returns a list of route desc entries.
Instance Method Details
#describe_route!(route) ⇒ Object
Adds a route description.
The argument must either be a Route, or an argument acceptable to Route.build.
(see Simple::Httpd::Route).
76 77 78 |
# File 'lib/simple/httpd/route.rb', line 76 def describe_route!(route) route_descriptions << ::Simple::Httpd::Route.build(route) end |
#route_descriptions ⇒ Object
returns a list of route desc entries.
When building a simple-httpd application we also collect all routes defined via get, put, etc., including their source location (which, for example, might point to a service’s method or to a controller source file).
(see Simple::Httpd::Route).
67 68 69 |
# File 'lib/simple/httpd/route.rb', line 67 def route_descriptions @route_descriptions ||= [] end |