diff options
author | Eric Wong <normalperson@yhbt.net> | 2009-11-12 13:32:56 -0800 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-11-12 13:36:31 -0800 |
commit | f301f399937f9ff62dc41a9cd8e1ea45b43baa6b (patch) | |
tree | e2345c94b1eba47f79b00f0251c7375b81a702a0 /lib/upr/status.rb | |
parent | e71a98deacd25bfaad5b80b0cd505e183933010c (diff) | |
download | upr-f301f399937f9ff62dc41a9cd8e1ea45b43baa6b.tar.gz |
Split out Params and StatusMethods
StatusMethods will be reusable in subclasses like the UprStatus ActiveRecord class. Params parsing will be common to both InputWrapper and also to the upcoming Streaming class.
Diffstat (limited to 'lib/upr/status.rb')
-rw-r--r-- | lib/upr/status.rb | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/lib/upr/status.rb b/lib/upr/status.rb index e3bb356..443933a 100644 --- a/lib/upr/status.rb +++ b/lib/upr/status.rb @@ -1,15 +1,8 @@ +require 'upr/status_methods' module Upr # this is what we store in the Moneta-backed monitor class Status < Struct.new(:seen, :length) - - def error? - seen == -1 - end - - def done? - length && seen >= length - end - + include StatusMethods end end |