Module: Simple::Httpd::Service::ControllerAdapter

Included in:
BaseController
Defined in:
lib/simple/httpd/service.rb

Instance Method Summary collapse

Instance Method Details

#delete(path, opts = {}, &block) ⇒ Object



27
28
29
# File 'lib/simple/httpd/service.rb', line 27

def delete(path, opts = {}, &block)
  service_route?("DELETE", path, opts, &block) || super
end

#get(path, opts = {}, &block) ⇒ Object



15
16
17
# File 'lib/simple/httpd/service.rb', line 15

def get(path, opts = {}, &block)
  service_route?("GET", path, opts, &block) || super
end

#head(path, opts = {}, &block) ⇒ Object



31
32
33
# File 'lib/simple/httpd/service.rb', line 31

def head(path, opts = {}, &block)
  service_route?("HEAD", path, opts, &block) || super
end

#mount_service(service) ⇒ Object



5
6
7
8
9
10
11
12
13
# File 'lib/simple/httpd/service.rb', line 5

def mount_service(service)
  @service = service

  instance_eval do
    yield(service)
  end
ensure
  @service = nil
end

#post(path, opts = {}, &block) ⇒ Object



19
20
21
# File 'lib/simple/httpd/service.rb', line 19

def post(path, opts = {}, &block)
  service_route?("POST", path, opts, &block) || super
end

#put(path, opts = {}, &block) ⇒ Object



23
24
25
# File 'lib/simple/httpd/service.rb', line 23

def put(path, opts = {}, &block)
  service_route?("PUT", path, opts, &block) || super
end