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.rb10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/mauve/people_list.rb b/lib/mauve/people_list.rb
index eab4ae3..0433034 100644
--- a/lib/mauve/people_list.rb
+++ b/lib/mauve/people_list.rb
@@ -35,6 +35,8 @@ module Mauve
arr = arr.flatten
when String
arr = [arr]
+ when Proc
+ arr = [arr]
else
logger.warn "Not sure what to do with #{arr.inspect} -- converting to string, and continuing"
arr = [arr.to_s]
@@ -62,10 +64,12 @@ module Mauve
#
# @return [Array]
def people
-
l = list.collect do |name|
- Configuration.current.people.has_key?(name) ? Configuration.current.people[name] : nil
- end.reject{|person| person.nil?}
+ name.is_a?(Proc) ? name.call : name
+ end.flatten.compact.uniq.collect do |name|
+ Configuration.current.people[name]
+ end.compact
+
#
# Hmm.. no-one in the list?!
#