aboutsummaryrefslogtreecommitdiff
path: root/lib/mauve/person.rb
diff options
context:
space:
mode:
authorPatrick J Cherry <patrick@bytemark.co.uk>2012-04-23 16:01:44 +0100
committerPatrick J Cherry <patrick@bytemark.co.uk>2012-04-23 16:01:44 +0100
commit6561f886ed03a79ca035a1733816ab97380576d2 (patch)
tree24282c1a9f85a6a1f1eb010df7c421f3c08315bb /lib/mauve/person.rb
parentca99b0dff974d2fc841d7132d03b3ad1d1bf9b1e (diff)
Persons/PeopleLists can now specify multiple notification preferences.
Diffstat (limited to 'lib/mauve/person.rb')
-rw-r--r--lib/mauve/person.rb22
1 files changed, 2 insertions, 20 deletions
diff --git a/lib/mauve/person.rb b/lib/mauve/person.rb
index 4b4baf1..1cf4ea0 100644
--- a/lib/mauve/person.rb
+++ b/lib/mauve/person.rb
@@ -5,7 +5,7 @@ require 'log4r'
module Mauve
class Person < Struct.new(:username, :password, :urgent, :normal, :low, :email, :xmpp, :sms)
- attr_reader :notification_thresholds, :last_pop3_login, :suppressed, :every, :during
+ attr_reader :notification_thresholds, :last_pop3_login, :suppressed, :notifications
# Set up a new Person
#
@@ -26,9 +26,7 @@ module Mauve
# TODO fix up web login so pop3 can be used as a proxy.
#
@last_pop3_login = {:from => nil, :at => nil}
-
- @every = nil
- @during = nil
+ @notifications = []
super(*args)
end
@@ -41,22 +39,6 @@ module Mauve
# @return [Boolean]
def suppressed? ; @suppressed ; end
- #
- #
- #
- def during=(arg)
- raise "during must be a block" unless arg.is_a?(Proc)
- @during = arg
- end
-
- #
- #
- #
- def every=(arg)
- raise ArgumentError, "every must be numeric" unless arg.is_a?(Numeric)
- @every = arg
- end
-
def holiday_url ; nil ; end
# Works out if a notification should be suppressed. If no parameters are supplied, it will