public
Rubygem
Description: Merb Core: All you need. None you don't.
Homepage: http://www.merbivore.com
Clone URL: git://github.com/wycats/merb-core.git
Search Repo:
Rename @status to @_status

We may want to do the same w/ @request and @headers

[#232 state:resolved]
ivey (author)
Wed Jun 11 15:13:50 -0700 2008
commit  480f4b21f751922bf642fd373c657753ce7f7ffb
tree    40599728fed53f44404363c495a9e601fed8e5b5
parent  33a25d088ddf4f6931a509f8dee712d48bb045cd
...
193
194
195
196
 
197
198
199
...
219
220
221
222
 
 
 
 
223
224
225
...
227
228
229
230
 
231
232
 
233
234
235
...
193
194
195
 
196
197
198
199
...
219
220
221
 
222
223
224
225
226
227
228
...
230
231
232
 
233
234
 
235
236
237
238
0
@@ -193,7 +193,7 @@ class Merb::Controller < Merb::AbstractController
0
   # @semipublic
0
   def initialize(request, status=200, headers={'Content-Type' => 'text/html; charset=utf-8'})
0
     super()
0
- @request, @status, @headers = request, status, headers
0
+ @request, @_status, @headers = request, status, headers
0
   end
0
 
0
   # Dispatch the action.
0
@@ -219,7 +219,10 @@ class Merb::Controller < Merb::AbstractController
0
   end
0
 
0
   attr_reader :request, :headers
0
- attr_reader :status
0
+
0
+ def status
0
+ @_status
0
+ end
0
 
0
   # Set the response status code.
0
   #
0
@@ -227,9 +230,9 @@ class Merb::Controller < Merb::AbstractController
0
   # s<Fixnum, Symbol>:: A status-code or named http-status
0
   def status=(s)
0
     if s.is_a?(Symbol) && STATUS_CODES.key?(s)
0
- @status = STATUS_CODES[s]
0
+ @_status = STATUS_CODES[s]
0
     elsif s.is_a?(Fixnum)
0
- @status = s
0
+ @_status = s
0
     else
0
       raise ArgumentError, "Status should be of type Fixnum or Symbol, was #{s.class}"
0
     end

Comments

    No one has commented yet.