class RackStep::Response
Public Instance Methods
body=(value)
click to toggle source
The original body= method of Rack::Response expects an array. In RackStep
the user may set it as a String and we will convert it to array if necessary.
Calls superclass method
# File lib/response.rb, line 11 def body=(value) if value.is_a?(String) value = [value] end super(value) end
content_type()
click to toggle source
Helpers
# File lib/response.rb, line 20 def content_type headers['Content-Type'] end
content_type=(value)
click to toggle source
# File lib/response.rb, line 23 def content_type=(value) headers['Content-Type'] = value end
redirect_to(address)
click to toggle source
# File lib/response.rb, line 26 def redirect_to(address) @status = 302 headers['Location'] = address end