class Ocular::Inputs::HTTP::Input::WebRunContext
Attributes
env[RW]
params[RW]
request[RW]
response[RW]
Public Class Methods
new()
click to toggle source
Calls superclass method
Ocular::DSL::RunContext::new
# File lib/ocular/inputs/http_input.rb, line 72 def initialize() super(Ocular::Logging::ConsoleLogger.new) @headers = {} end
Public Instance Methods
content_type(type)
click to toggle source
# File lib/ocular/inputs/http_input.rb, line 77 def content_type(type) @headers["Content-Type"] = type end
exec_wrapper(res)
click to toggle source
# File lib/ocular/inputs/http_input.rb, line 81 def exec_wrapper(res) if Fixnum === res res = [res, @headers, nil] end if String === res res = [200, @headers, res] end return res end