Module: Simple::Httpd::ServiceIntegration
- Included in:
- BaseController
- Defined in:
- lib/simple/httpd/service_integration.rb
Defined Under Namespace
Modules: Helpers
Classes: Adapter
Instance Method Summary
collapse
-
#delete(path, opts = {}, &block) ⇒ Object
-
#get(path, opts = {}, &block) ⇒ Object
-
#head(path, opts = {}, &block) ⇒ Object
-
#mount_service(service) ⇒ Object
-
#post(path, opts = {}, &block) ⇒ Object
-
#put(path, opts = {}, &block) ⇒ Object
Instance Method Details
#delete(path, opts = {}, &block) ⇒ Object
46
47
48
|
# File 'lib/simple/httpd/service_integration.rb', line 46
def delete(path, opts = {}, &block)
install_route("DELETE", path, opts, &block)
end
|
#get(path, opts = {}, &block) ⇒ Object
34
35
36
|
# File 'lib/simple/httpd/service_integration.rb', line 34
def get(path, opts = {}, &block)
install_route("GET", path, opts, &block)
end
|
#head(path, opts = {}, &block) ⇒ Object
50
51
52
|
# File 'lib/simple/httpd/service_integration.rb', line 50
def head(path, opts = {}, &block)
install_route("HEAD", path, opts, &block)
end
|
#mount_service(service) ⇒ Object
27
28
29
30
31
32
|
# File 'lib/simple/httpd/service_integration.rb', line 27
def mount_service(service)
@service = Adapter.new(service)
yield(@service)
ensure
@service = nil
end
|
#post(path, opts = {}, &block) ⇒ Object
38
39
40
|
# File 'lib/simple/httpd/service_integration.rb', line 38
def post(path, opts = {}, &block)
install_route("POST", path, opts, &block)
end
|
#put(path, opts = {}, &block) ⇒ Object
42
43
44
|
# File 'lib/simple/httpd/service_integration.rb', line 42
def put(path, opts = {}, &block)
install_route("PUT", path, opts, &block)
end
|