Class: Lita::HTTPRoute
- Inherits:
-
Object
- Object
- Lita::HTTPRoute
- Defined in:
- lib/lita/http_route.rb
Overview
Handlers use this class to define HTTP routes for the built-in web server.
Constant Summary collapse
- ExtendedRoute =
An
HttpRouter::Route
class used for dispatch. Class.new(HttpRouter::Route) do include HttpRouter::RouteHelper include HttpRouter::GenerationHelper end
Instance Attribute Summary collapse
-
#handler_class ⇒ Lita::Handler
readonly
The handler registering the route.
Instance Method Summary collapse
- #delete ⇒ Object
- #get ⇒ Object
- #head ⇒ Object
-
#initialize(handler_class) ⇒ HTTPRoute
constructor
A new instance of HTTPRoute.
- #link ⇒ Object
- #options ⇒ Object
- #patch ⇒ Object
- #post ⇒ Object
- #put ⇒ Object
- #unlink ⇒ Object
Constructor Details
#initialize(handler_class) ⇒ HTTPRoute
Returns a new instance of HTTPRoute.
17 18 19 |
# File 'lib/lita/http_route.rb', line 17 def initialize(handler_class) @handler_class = handler_class end |
Instance Attribute Details
#handler_class ⇒ Lita::Handler (readonly)
The handler registering the route.
14 15 16 |
# File 'lib/lita/http_route.rb', line 14 def handler_class @handler_class end |
Instance Method Details
#delete(path, method_name, options = {}) ⇒ void #delete(path, options = {}) { ... } ⇒ void
51 |
# File 'lib/lita/http_route.rb', line 51 define_http_method :delete |
#get(path, method_name, options = {}) ⇒ void #get(path, options = {}) { ... } ⇒ void
47 |
# File 'lib/lita/http_route.rb', line 47 define_http_method :get |
#head(path, method_name, options = {}) ⇒ void #head(path, options = {}) { ... } ⇒ void
46 |
# File 'lib/lita/http_route.rb', line 46 define_http_method :head |
#link(path, method_name, options = {}) ⇒ void #link(path, options = {}) { ... } ⇒ void
53 |
# File 'lib/lita/http_route.rb', line 53 define_http_method :link |
#options(path, method_name, options = {}) ⇒ void #options(path, options = {}) { ... } ⇒ void
52 |
# File 'lib/lita/http_route.rb', line 52 define_http_method :options |
#patch(path, method_name, options = {}) ⇒ void #patch(path, options = {}) { ... } ⇒ void
50 |
# File 'lib/lita/http_route.rb', line 50 define_http_method :patch |
#post(path, method_name, options = {}) ⇒ void #post(path, options = {}) { ... } ⇒ void
48 |
# File 'lib/lita/http_route.rb', line 48 define_http_method :post |
#put(path, method_name, options = {}) ⇒ void #put(path, options = {}) { ... } ⇒ void
49 |
# File 'lib/lita/http_route.rb', line 49 define_http_method :put |
#unlink(path, method_name, options = {}) ⇒ void #unlink(path, options = {}) { ... } ⇒ void
54 |
# File 'lib/lita/http_route.rb', line 54 define_http_method :unlink |