aboutsummaryrefslogtreecommitdiff
path: root/lib/mauve/people_list.rb
diff options
context:
space:
mode:
authorPatrick J Cherry <patrick@bytemark.co.uk>2012-04-27 11:12:27 +0100
committerPatrick J Cherry <patrick@bytemark.co.uk>2012-04-27 11:12:27 +0100
commitdada535a41cba45be0eff77381d6c7e19ab49f51 (patch)
treef33ab8706c38f278fbdec539e69874d72a9e1b74 /lib/mauve/people_list.rb
parentffb9ad5713f0f7b895ec142028abae16d824e3b9 (diff)
Added better time-based people list polling, and added a "calendar" method to
the config to easily generate Procs to call for people_lists.
Diffstat (limited to 'lib/mauve/people_list.rb')
-rw-r--r--lib/mauve/people_list.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/mauve/people_list.rb b/lib/mauve/people_list.rb
index 0433034..f632f78 100644
--- a/lib/mauve/people_list.rb
+++ b/lib/mauve/people_list.rb
@@ -63,9 +63,9 @@ module Mauve
# Return the array of people
#
# @return [Array]
- def people
+ def people(at = Time.now)
l = list.collect do |name|
- name.is_a?(Proc) ? name.call : name
+ name.is_a?(Proc) ? name.call(at) : name
end.flatten.compact.uniq.collect do |name|
Configuration.current.people[name]
end.compact