From 9b6679ec50ecd184fccd195bd14bda3c6ea2070f Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 5 Jan 2011 16:15:29 -0800 Subject: simplify Rainbows.max_bytes implementation Yes, I'm still learning Ruby. --- lib/rainbows.rb | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'lib/rainbows.rb') diff --git a/lib/rainbows.rb b/lib/rainbows.rb index 909e97e..3f9058e 100644 --- a/lib/rainbows.rb +++ b/lib/rainbows.rb @@ -80,14 +80,13 @@ module Rainbows end # :stopdoc: - # the default max body size is 1 megabyte (1024 * 1024 bytes) - @@max_bytes = 1024 * 1024 - - def max_bytes; @@max_bytes; end - def max_bytes=(nr); @@max_bytes = nr; end + attr_accessor :max_bytes # :startdoc: end + # the default max body size is 1 megabyte (1024 * 1024 bytes) + @max_bytes = 1024 * 1024 + # :stopdoc: # maps models to default worker counts, default worker count numbers are # pretty arbitrary and tuning them to your application and hardware is -- cgit v1.2.3-24-ge0c7