Class: Callapi::Routes
- Inherits:
-
Object
show all
- Defined in:
- lib/callapi/routes.rb
Defined Under Namespace
Classes: HelperMethodCreator, Metadata
Class Method Summary
collapse
Class Method Details
.delete(*args) ⇒ Object
27
28
29
|
# File 'lib/callapi/routes.rb', line 27
def delete(*args)
save_route(Callapi::Delete, *args)
end
|
.draw(&block) ⇒ Object
6
7
8
9
10
11
12
13
|
# File 'lib/callapi/routes.rb', line 6
def draw(&block)
build_http_method_namespaces
instance_eval &block
create_classes
create_helper_methods
end
|
.get(*args) ⇒ Object
15
16
17
|
# File 'lib/callapi/routes.rb', line 15
def get(*args)
save_route(Callapi::Get, *args)
end
|
.namespace(*args) ⇒ Object
35
36
37
38
39
|
# File 'lib/callapi/routes.rb', line 35
def namespace(*args)
add_namespace(args.shift)
yield
remove_namespace
end
|
.patch(*args) ⇒ Object
31
32
33
|
# File 'lib/callapi/routes.rb', line 31
def patch(*args)
save_route(Callapi::Patch, *args)
end
|
.post(*args) ⇒ Object
19
20
21
|
# File 'lib/callapi/routes.rb', line 19
def post(*args)
save_route(Callapi::Post, *args)
end
|
.put(*args) ⇒ Object
23
24
25
|
# File 'lib/callapi/routes.rb', line 23
def put(*args)
save_route(Callapi::Put, *args)
end
|