Module: Lita::Handler::HTTPRouter
- Included in:
- Lita::Handler
- Defined in:
- lib/lita/handler/http_router.rb
Overview
A handler mixin that provides the methods necessary for handling incoming HTTP requests.
Class Method Summary collapse
-
.extended(klass) ⇒ Object
Includes common handler methods in any class that includes HTTPRouter.
Instance Method Summary collapse
-
#http ⇒ Lita::HTTPRoute
Creates a new Lita::HTTPRoute which is used to define an HTTP route for the built-in web server.
-
#http_routes ⇒ Array<Lita::HTTPRoute>
An array of all HTTP routes defined for the handler.
Class Method Details
.extended(klass) ⇒ Object
Includes common handler methods in any class that includes Lita::Handler::HTTPRouter.
7 8 9 |
# File 'lib/lita/handler/http_router.rb', line 7 def self.extended(klass) klass.send(:include, Common) end |
Instance Method Details
#http ⇒ Lita::HTTPRoute
Creates a new Lita::HTTPRoute which is used to define an HTTP route for the built-in web server.
15 16 17 |
# File 'lib/lita/handler/http_router.rb', line 15 def http HTTPRoute.new(self) end |
#http_routes ⇒ Array<Lita::HTTPRoute>
An array of all HTTP routes defined for the handler.
21 22 23 |
# File 'lib/lita/handler/http_router.rb', line 21 def http_routes @http_routes ||= [] end |