Sha256: c0dae856f6e4d10013621b9a22a021fd346d980c7faa799924bab4ce359d35c0

Contents?: true

Size: 784 Bytes

Versions: 24

Compression:

Stored size: 784 Bytes

Contents

module Lita
  class Handler
    # A handler mixin that provides the methods necessary for handling incoming HTTP requests.
    # @since 4.0.0
    module HTTPRouter
      # Includes common handler methods in any class that includes {HTTPRouter}.
      def self.extended(klass)
        klass.send(:include, Common)
      end

      # 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}.
      def http
        HTTPRoute.new(self)
      end

      # An array of all HTTP routes defined for the handler.
      # @return [Array<Lita::HTTPRoute>] The array of routes.
      def http_routes
        @http_routes ||= []
      end
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
lita-4.8.0 lib/lita/handler/http_router.rb
lita-4.8.0.beta1 lib/lita/handler/http_router.rb
lita-4.7.1 lib/lita/handler/http_router.rb
lita-4.7.0 lib/lita/handler/http_router.rb
lita-4.6.1 lib/lita/handler/http_router.rb
lita-4.6.0 lib/lita/handler/http_router.rb
lita-4.5.0 lib/lita/handler/http_router.rb
lita-4.4.3 lib/lita/handler/http_router.rb
lita-4.4.2 lib/lita/handler/http_router.rb
lita-4.4.1 lib/lita/handler/http_router.rb
lita-4.4.0 lib/lita/handler/http_router.rb
lita-4.3.2 lib/lita/handler/http_router.rb
lita-4.3.1 lib/lita/handler/http_router.rb
lita-4.3.0 lib/lita/handler/http_router.rb
lita-4.2.1 lib/lita/handler/http_router.rb
lita-4.2.0 lib/lita/handler/http_router.rb
lita-4.1.0 lib/lita/handler/http_router.rb
lita-4.0.4 lib/lita/handler/http_router.rb
lita-4.0.3 lib/lita/handler/http_router.rb
lita-4.0.2 lib/lita/handler/http_router.rb