Module: Knot::Dispatch::Router::API
- Included in:
- Knot::Dispatch::Router
- Defined in:
- lib/knot/dispatch/router/api.rb
Instance Method Summary collapse
- #delete(name, path, &block) ⇒ Object
- #filter(name, options, &block) ⇒ Object
- #get(name, path, &block) ⇒ Object
- #head(name, path, &block) ⇒ Object
- #options(name, path, &block) ⇒ Object
- #patch(name, path, &block) ⇒ Object
- #post(name, path, &block) ⇒ Object
- #put(name, path, &block) ⇒ Object
Instance Method Details
#delete(name, path, &block) ⇒ Object
18 19 20 |
# File 'lib/knot/dispatch/router/api.rb', line 18 def delete(name, path, &block) config.register_route(:delete, name, path, &block) end |
#filter(name, options, &block) ⇒ Object
34 35 36 |
# File 'lib/knot/dispatch/router/api.rb', line 34 def filter(name, , &block) config.add_filter(name, , &block) end |
#get(name, path, &block) ⇒ Object
6 7 8 |
# File 'lib/knot/dispatch/router/api.rb', line 6 def get(name, path, &block) config.register_route(:get, name, path, &block) end |
#head(name, path, &block) ⇒ Object
26 27 28 |
# File 'lib/knot/dispatch/router/api.rb', line 26 def head(name, path, &block) config.register_route(:head, name, path, &block) end |
#options(name, path, &block) ⇒ Object
30 31 32 |
# File 'lib/knot/dispatch/router/api.rb', line 30 def (name, path, &block) config.register_route(:options, name, path, &block) end |
#patch(name, path, &block) ⇒ Object
22 23 24 |
# File 'lib/knot/dispatch/router/api.rb', line 22 def patch(name, path, &block) config.register_route(:patch, name, path, &block) end |
#post(name, path, &block) ⇒ Object
10 11 12 |
# File 'lib/knot/dispatch/router/api.rb', line 10 def post(name, path, &block) config.register_route(:post, name, path, &block) end |
#put(name, path, &block) ⇒ Object
14 15 16 |
# File 'lib/knot/dispatch/router/api.rb', line 14 def put(name, path, &block) config.register_route(:put, name, path, &block) end |