From 8bafdd0e6c8dcb792b71d001821e8701c9df7fee Mon Sep 17 00:00:00 2001
From: Steve Kemp <steve@steve.org.uk>
Date: Sat, 24 Nov 2012 15:00:20 +0000
Subject:   Updated to allow class type-identification

---
 lib/custodian/alertfactory.rb | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

(limited to 'lib')

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
 
-- 
cgit v1.2.3