class RackStep::Response
Public Instance Methods
Source
# File lib/response.rb, line 11 def body=(value) if value.is_a?(String) value = [value] end super(value) end
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
Source
# File lib/response.rb, line 20 def content_type headers['Content-Type'] end
Helpers
Source
# File lib/response.rb, line 23 def content_type=(value) headers['Content-Type'] = value end
Source
# File lib/response.rb, line 26 def redirect_to(address) @status = 302 headers['Location'] = address end