Sha256: c1493a737b47294ddb158656d49eb6adf3181ffe124e0c78a410cbe76461a89c

Contents?: true

Size: 663 Bytes

Versions: 8

Compression:

Stored size: 663 Bytes

Contents

# * George Moschovitis  <gm@navel.gr>
# (c) 2004-2005 Navel, all rights reserved.
# $Id: nitro.rb 167 2004-11-23 14:03:10Z gmosx $

module N
	
# HTTP Response.

module Response

	# The Response status.

	attr_accessor :status

	# The Response headers.

	attr_accessor :response_headers

	# The Response cookies.

	attr_accessor :response_cookies

	def content_type=(ctype)
		@response_headers['Content-Type'] = ctype
	end

	# Add a cookie to the response. Better use this
	# method to avoid precreating the cookies array
	# for every request.
	
	def add_cookie(cookie)
		(@response_cookies ||= []) << cookie
	end
	alias_method :send_cookie, :add_cookie

end

end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
nitro-0.12.0 lib/nitro/response.rb
nitro-0.10.0 lib/nitro/response.rb
nitro-0.11.0 lib/nitro/response.rb
nitro-0.13.0 lib/nitro/response.rb
nitro-0.14.0 lib/nitro/response.rb
nitro-0.15.0 lib/nitro/response.rb
nitro-0.9.5 lib/nitro/response.rb
nitro-0.9.3 lib/nitro/response.rb