aboutsummaryrefslogtreecommitdiff
path: root/lib/mauve/people_list.rb
diff options
context:
space:
mode:
authorPatrick J Cherry <patrick@bytemark.co.uk>2011-09-16 12:47:52 +0100
committerPatrick J Cherry <patrick@bytemark.co.uk>2011-09-16 12:47:52 +0100
commit38e4d877abee3c8e40edd932057e2bf16ad01e13 (patch)
treed2201a1c18fbebec4e0594b81c27974057e886b2 /lib/mauve/people_list.rb
parentf63d7076e52a8844f1cfe43e57330687d88e83b6 (diff)
Big documentation update.
Diffstat (limited to 'lib/mauve/people_list.rb')
-rw-r--r--lib/mauve/people_list.rb19
1 files changed, 13 insertions, 6 deletions
diff --git a/lib/mauve/people_list.rb b/lib/mauve/people_list.rb
index b15db3f..6b2ba33 100644
--- a/lib/mauve/people_list.rb
+++ b/lib/mauve/people_list.rb
@@ -4,14 +4,18 @@ require 'mauve/calendar_interface'
module Mauve
- # Stores a list of name.
+ # Stores a list of Mauve::Person
+ #
#
- # @author Yann Golanski
class PeopleList
attr_reader :label, :list
- # Default contrustor.
+ # Create a new list
+ #
+ # @param [String] label The name of the list
+ # @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)
@label = label
@@ -20,6 +24,10 @@ module Mauve
alias username label
+ # Append an Array or String to a list
+ #
+ # @param [Array or String] arr
+ # @return [Mauve::PeopleList] self
def +(arr)
case arr
when Array
@@ -44,15 +52,14 @@ module Mauve
alias add_to_list +
- #
- # Set up the logger
+ # @return Log4r::Logger
def logger
@logger ||= Log4r::Logger.new self.class.to_s
end
- #
# Return the array of people
#
+ # @return [Array]
def people
l = list.collect do |name|