diff options
Diffstat (limited to 'lib/upr/status_methods.rb')
-rw-r--r-- | lib/upr/status_methods.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/upr/status_methods.rb b/lib/upr/status_methods.rb new file mode 100644 index 0000000..e82a0f0 --- /dev/null +++ b/lib/upr/status_methods.rb @@ -0,0 +1,12 @@ +module Upr + # mixin module for both Upr::Status and UprStatus (AR example module) + module StatusMethods + def error? + seen < 0 + end + + def done? + length && seen >= length + end + end +end |