Module: Mojito::Controllers::Runtime::Methods

Defined in:
lib/mojito/controllers/runtime/methods.rb

Instance Method Summary collapse

Instance Method Details

#DELETEObject



27
28
29
# File 'lib/mojito/controllers/runtime/methods.rb', line 27

def DELETE
	METHOD(:delete)
end

#GETObject



11
12
13
# File 'lib/mojito/controllers/runtime/methods.rb', line 11

def GET
	METHOD(:get)
end

#HEADObject



15
16
17
# File 'lib/mojito/controllers/runtime/methods.rb', line 15

def HEAD
	METHOD(:head)
end

#METHOD(method) ⇒ Object



7
8
9
# File 'lib/mojito/controllers/runtime/methods.rb', line 7

def METHOD(method)
	proc { request.request_method == method.to_s.upcase }
end

#POSTObject



19
20
21
# File 'lib/mojito/controllers/runtime/methods.rb', line 19

def POST
	METHOD(:post)
end

#PUTObject



23
24
25
# File 'lib/mojito/controllers/runtime/methods.rb', line 23

def PUT
	METHOD(:put)
end