aboutsummaryrefslogtreecommitdiff
path: root/lib/mauve/configuration.rb
blob: 56f5e7e3dbb09c972e237d725bcf190e7823c30a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
require 'mauve/source_list'
require 'mauve/people_list'
require 'mauve/mauve_time'

module Mauve

  ## Configuration object for Mauve.
  #
  #
  # @TODO Write some more documentation. This is woefully inadequate.
  #
  class Configuration

    class << self
      attr_accessor :current
    end
    
    attr_accessor :server
    attr_accessor :last_alert_group
    attr_reader   :notification_methods
    attr_reader   :people
    attr_reader   :alert_groups
    attr_reader   :people_lists
    attr_reader   :source_lists
 
    def initialize
      @notification_methods = {}
      @people = {}
      @people_lists = Hash.new{|h,k| h[k] = Mauve::PeopleList.new(k)}
      @source_lists = Hash.new{|h,k| h[k] = Mauve::SourceList.new(k)}
      @alert_groups = []
    end
    
  end
end