aboutsummaryrefslogtreecommitdiff
path: root/lib/mauve/people_list.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/mauve/people_list.rb')
-rw-r--r--lib/mauve/people_list.rb20
1 files changed, 19 insertions, 1 deletions
diff --git a/lib/mauve/people_list.rb b/lib/mauve/people_list.rb
index 6b2ba33..1890ab1 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
+ attr_reader :label, :list, :during, :every
# Create a new list
#
@@ -20,10 +20,28 @@ module Mauve
raise ArgumentError, "people_list label must be a string" unless label.is_a?(String)
@label = label
@list = []
+ @during = nil
+ @every = nil
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