Top Level Namespace
Defined in:
Macro Summary
-
vessel_method(verb)
Creates a REST verb for a vessel
-
vessel_methods(*args)
Runs
#vessel_method
on all verbs given. -
vessels_method(verb)
Creates a REST verb for a vessel, not including ID
-
vessels_methods(*args)
Runs
#vessels_method
on all verbs given.
Macro Detail
macro vessel_method(verb)
#
Creates a REST verb for a vessel
For example:
vessel_method get
# ==>
get "/vessels/:id" do |env|
id = env.params.url["id"].to_i32
world.http_get(id, env)
end
macro vessels_method(verb)
#
Creates a REST verb for a vessel, not including ID
For example:
vessels_method post
# ==>
post "/vessels" do |env|
world.http_post(env)
end