Module: Pepito::Handler::HTTPRouter
- Included in:
- Pepito::Handler
- Defined in:
- lib/pepito/handler/http_router.rb
Overview
Routes for the http api
Instance Method Summary collapse
-
#http_route(method, path, cb) ⇒ void
Add an http route to the http_routes array.
-
#http_routes ⇒ Array<Pepito::HTTPApi::HTTPRoute>
List of http routes.
Instance Method Details
#http_route(method, path, cb) ⇒ void
This method returns an undefined value.
Add an http route to the http_routes array.
14 15 16 17 18 19 20 21 |
# File 'lib/pepito/handler/http_router.rb', line 14 def http_route(method, path, cb) http_routes << HTTPApi::HTTPRoute.new( @robot, self, method, path, cb) end |
#http_routes ⇒ Array<Pepito::HTTPApi::HTTPRoute>
List of http routes.
25 26 27 |
# File 'lib/pepito/handler/http_router.rb', line 25 def http_routes @http_routes ||= [] end |