Renamed all occurrences of ctx to env

This commit is contained in:
Sdogruyol 2015-10-29 11:49:58 +02:00
parent 5bc81e7e5b
commit a0c909621c
3 changed files with 16 additions and 16 deletions

View file

@ -1,9 +1,9 @@
require "kemal"
require "json"
# You can easily access the environment and set content_type like 'application/json'.
# You can easily access the context and set content_type like 'application/json'.
# Look how easy to build a JSON serving API.
get "/" do |env|
env.response.content_type = "application/json"
env.set_content_type = "application/json"
{name: "Serdar", age: 27}.to_json
end