aboutsummaryrefslogtreecommitdiff
path: root/lib/mauve/configuration.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/mauve/configuration.rb')
-rw-r--r--lib/mauve/configuration.rb38
1 files changed, 32 insertions, 6 deletions
diff --git a/lib/mauve/configuration.rb b/lib/mauve/configuration.rb
index 56f5e7e..a74165b 100644
--- a/lib/mauve/configuration.rb
+++ b/lib/mauve/configuration.rb
@@ -4,26 +4,52 @@ require 'mauve/mauve_time'
module Mauve
- ## Configuration object for Mauve.
- #
- #
- # @TODO Write some more documentation. This is woefully inadequate.
+ # Configuration object for Mauve. This is used as the context in
+ # Mauve::ConfigurationBuilder.
#
class Configuration
class << self
+ # The current configuration
+ # @param [Mauve::Configuration]
+ # @return [Mauve::Configuration]
attr_accessor :current
end
-
+
+ # The Server instance
+ # @return [Mauve::Server]
attr_accessor :server
+
+ # The last AlertGroup to be configured
+ # @return [Mauve::AlertGroup]
attr_accessor :last_alert_group
+
+ # Notification methods
+ # @return [Hash]
attr_reader :notification_methods
+
+ # People
+ # @return [Hash]
attr_reader :people
+
+ # Alert groups
+ # @return [Array]
attr_reader :alert_groups
+
+ # People lists
+ # @return [Hash]
attr_reader :people_lists
+
+ # The source lists
+ # @return [Hash]
attr_reader :source_lists
-
+
+ #
+ # Set up a base config.
+ #
def initialize
+ @server = nil
+ @last_alert_group = nil
@notification_methods = {}
@people = {}
@people_lists = Hash.new{|h,k| h[k] = Mauve::PeopleList.new(k)}