2015-10-29 15:16:29 +00:00
|
|
|
# Context is the environment which holds request/response specific
|
|
|
|
# information such as params, content_type e.g
|
2015-10-23 18:33:26 +00:00
|
|
|
class Kemal::Context
|
2014-07-30 23:50:14 +00:00
|
|
|
getter request
|
2015-10-28 16:09:45 +00:00
|
|
|
getter params
|
2015-10-28 18:52:34 +00:00
|
|
|
getter content_type
|
2014-07-30 23:50:14 +00:00
|
|
|
|
2015-10-28 16:09:45 +00:00
|
|
|
def initialize(@request, @params)
|
2015-10-28 19:54:04 +00:00
|
|
|
@content_type = "text/html"
|
2014-07-30 23:50:14 +00:00
|
|
|
end
|
|
|
|
|
2015-10-28 18:52:34 +00:00
|
|
|
def set_content_type(content_type)
|
|
|
|
@content_type = content_type
|
2014-07-30 23:50:14 +00:00
|
|
|
end
|
|
|
|
end
|