summaryrefslogtreecommitdiff
path: root/lib/custodian/alertfactory.rb
diff options
context:
space:
mode:
authorSteve Kemp <steve@steve.org.uk>2012-11-24 15:00:20 +0000
committerSteve Kemp <steve@steve.org.uk>2012-11-24 15:00:20 +0000
commit8bafdd0e6c8dcb792b71d001821e8701c9df7fee (patch)
tree9b4d611985ffad448a7c744c4ccdcb6563416e2c /lib/custodian/alertfactory.rb
parent9abebc01ed73bb51a14f47cefe5dcfd018141e5c (diff)
Updated to allow class type-identification
Diffstat (limited to 'lib/custodian/alertfactory.rb')
-rw-r--r--lib/custodian/alertfactory.rb17
1 files changed, 15 insertions, 2 deletions
diff --git a/lib/custodian/alertfactory.rb b/lib/custodian/alertfactory.rb
index f82706f..74f6f3c 100644
--- a/lib/custodian/alertfactory.rb
+++ b/lib/custodian/alertfactory.rb
@@ -55,15 +55,28 @@ module Custodian
end
+ #
+ # Get the friendly-type of this class
+ #
+ def get_type
+ @@subclasses.each do |name,value|
+ if ( value == self.class )
+ return name
+ end
+ end
+ nil
+ end
+
+
def raise
- raise NoMethod, "This should be implemented in a derived class"
+ puts "NOP"
end
def clear
- raise NoMethod, "This should be implemented in a derived class"
+ puts "NOP"
end
end