summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/custodian/alertfactory.rb7
-rw-r--r--lib/custodian/settings.rb6
-rw-r--r--lib/custodian/testfactory.rb8
3 files changed, 10 insertions, 11 deletions
diff --git a/lib/custodian/alertfactory.rb b/lib/custodian/alertfactory.rb
index e0ec13f..a9b6d3d 100644
--- a/lib/custodian/alertfactory.rb
+++ b/lib/custodian/alertfactory.rb
@@ -67,18 +67,17 @@ module Custodian
#
- # Return an array of the notifiers we know about.
+ # Return the notifiers we know about.
#
# i.e. Derived classes that have registered themselves.
#
- #
def self.known_alerters
@@subclasses
end
#
- # Get the friendly-type of this class
+ # Get the friendly-type of derived-classes.
#
def get_type
@@subclasses.each do |name,value|
@@ -108,6 +107,7 @@ module Custodian
end
+
#
# Raise an alert.
#
@@ -116,6 +116,7 @@ module Custodian
end
+
#
# Clear an alert.
#
diff --git a/lib/custodian/settings.rb b/lib/custodian/settings.rb
index bef2977..b2bdb04 100644
--- a/lib/custodian/settings.rb
+++ b/lib/custodian/settings.rb
@@ -8,8 +8,8 @@ require 'singleton'
#
# The configuration file is optional, and we have defaults for every value.
#
-# This class is a singleton to avoid having to re-parse the configuration file more than
-# once per program-launch.
+# This class is a singleton to avoid having to re-parse the configuration
+# file more than once per program-launch.
#
module Custodian
@@ -48,7 +48,7 @@ module Custodian
#
# Load and "parse" the key=value content.
#
- File.open( file, "r").each_line do |line|
+ File.open( file, "r" ).each_line do |line|
next if ( line.nil? || line =~ /^#/ )
if ( line =~ /^(.*)=(.*)$/ )
key = $1.dup
diff --git a/lib/custodian/testfactory.rb b/lib/custodian/testfactory.rb
index b00703f..41bc445 100644
--- a/lib/custodian/testfactory.rb
+++ b/lib/custodian/testfactory.rb
@@ -28,7 +28,6 @@ module Custodian
#
# The line will be like "target must run tcp|ssh|ftp|smtp .."
#
- #
def self.create( line )
@@ -76,7 +75,7 @@ module Custodian
return( result )
else
- raise "Unknown line given - Failed to instantiate a suitable protocol-test: '#{line}'"
+ raise "Failed to instantiate a suitable protocol-test for '#{line}'"
end
end
@@ -91,18 +90,17 @@ module Custodian
#
- # Return an array of test-types we know about
+ # Return the test-types we know about.
#
# i.e. Derived classes that have registered themselves.
#
- #
def self.known_tests
@@subclasses
end
#
- # Get the friendly-type of this class
+ # Get the friendly-type of derived-classes
#
def get_type
# get each registed type