From 8a75f9462d9a3fd9eaebf37ce530b9c578983438 Mon Sep 17 00:00:00 2001 From: Stormwind Date: Sat, 24 Nov 2012 15:35:23 +0100 Subject: Add an = at the end of the content_type method Shall made use of this functionality more confortable, even if it's not a real attribute of this class. --- lib/zero/response.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/zero/response.rb b/lib/zero/response.rb index 13a053e..22c718b 100644 --- a/lib/zero/response.rb +++ b/lib/zero/response.rb @@ -40,7 +40,7 @@ module Zero # Set content length, if not already set content_length unless header.has_key? 'Content-Length' # Set content type, if not already set - content_type 'text/html' unless header.has_key? 'Content-Type' + self.content_type = 'text/html' unless header.has_key? 'Content-Type' end [status, header, body] @@ -56,7 +56,7 @@ module Zero # Sets the content type to the given value # Also creates it, if it does not exists # - def content_type(value) + def content_type=(value) self.header['Content-Type'] = value end -- cgit v1.2.3-70-g09d2