diff options
author | Patrick J Cherry <patrick@bytemark.co.uk> | 2012-04-27 09:32:14 +0100 |
---|---|---|
committer | Patrick J Cherry <patrick@bytemark.co.uk> | 2012-04-27 09:32:14 +0100 |
commit | de2733b029ab078e0d4a259c5b71a690033753ac (patch) | |
tree | 6b712ab11fa1fd6f62411951eb5994da77f4bf8a /lib/mauve/notification.rb | |
parent | 61afa439b5d7ebf5d28461d7097702d14e763037 (diff) |
Added no_one_in test for DuringRunner
Diffstat (limited to 'lib/mauve/notification.rb')
-rw-r--r-- | lib/mauve/notification.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/mauve/notification.rb b/lib/mauve/notification.rb index 5877e0f..8a5d241 100644 --- a/lib/mauve/notification.rb +++ b/lib/mauve/notification.rb @@ -115,6 +115,17 @@ module Mauve protected + # Test to see if a people_list is empty. + # + # @param [String] people_list People list to query + # @return [Boolean] + # + def no_one_in(people_list) + return true unless Configuration.current.people_lists.has_key?(people_list) + + return Configuration.current.people_lists[people_list].people.empty? + end + # Returns true if the current hour is in the list of hours given. # # @param [Array] hours List of hours (as Integers) |