aboutsummaryrefslogtreecommitdiff
path: root/lib/mauve/people_list.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/people_list.rb
parentca99b0dff974d2fc841d7132d03b3ad1d1bf9b1e (diff)
Persons/PeopleLists can now specify multiple notification preferences.
Diffstat (limited to 'lib/mauve/people_list.rb')
-rw-r--r--lib/mauve/people_list.rb23
1 files changed, 3 insertions, 20 deletions
diff --git a/lib/mauve/people_list.rb b/lib/mauve/people_list.rb
index 1890ab1..eab4ae3 100644
--- a/lib/mauve/people_list.rb
+++ b/lib/mauve/people_list.rb
@@ -9,7 +9,7 @@ module Mauve
#
class PeopleList
- attr_reader :label, :list, :during, :every
+ attr_reader :label, :list, :notifications
# Create a new list
#
@@ -17,31 +17,14 @@ module Mauve
# @raise [ArgumentError] if the label is not a string
#
def initialize(label)
- raise ArgumentError, "people_list label must be a string" unless label.is_a?(String)
+ raise ArgumentError, "people_list label must be a string #{label.inspect}" unless label.is_a?(String)
@label = label
@list = []
- @during = nil
- @every = nil
+ @notifications = []
end
alias username label
- #
- #
- #
- 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
-
# Append an Array or String to a list
#
# @param [Array or String] arr