Module: Knot::Dispatch::Router::API

Included in:
Knot::Dispatch::Router
Defined in:
lib/knot/dispatch/router/api.rb

Instance Method Summary collapse

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, options, &block)
  config.add_filter(name, options, &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 options(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