module Lita::Handler::HTTPRouter

A handler mixin that provides the methods necessary for handling incoming HTTP requests. @since 4.0.0

Public Class Methods

extended(klass) click to toggle source

Includes common handler methods in any class that includes {HTTPRouter}.

# File lib/lita/handler/http_router.rb, line 7
def self.extended(klass)
  klass.send(:include, Common)
end

Public Instance Methods

http() click to toggle source

Creates a new {Lita::HTTPRoute} which is used to define an HTTP route for the built-in web server. @see Lita::HTTPRoute @return [Lita::HTTPRoute] The new {Lita::HTTPRoute}.

# File lib/lita/handler/http_router.rb, line 15
def http
  HTTPRoute.new(self)
end
http_routes() click to toggle source

An array of all HTTP routes defined for the handler. @return [Array<Lita::HTTPRoute>] The array of routes.

# File lib/lita/handler/http_router.rb, line 21
def http_routes
  @http_routes ||= []
end