summaryrefslogtreecommitdiffstats
path: root/lib/blink/objects.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/blink/objects.rb')
-rw-r--r--lib/blink/objects.rb16
1 files changed, 14 insertions, 2 deletions
diff --git a/lib/blink/objects.rb b/lib/blink/objects.rb
index e00b7ac7c..14ecd92b5 100644
--- a/lib/blink/objects.rb
+++ b/lib/blink/objects.rb
@@ -5,12 +5,17 @@
require 'blink/attribute'
require 'blink/interface'
+puts Blink.class
module Blink
class Objects < Blink::Interface
include Enumerable
- @objects = Hash.new # a class instance variable
- @@allobjects = Array.new # and then a hash for all objects
+ @objects = Hash.new
+ @@allobjects = Array.new # and then an array for all objects
+
+ @@types = Hash.new { |hash,key|
+ raise "Object type %s not found" % key
+ }
#---------------------------------------------------------------
# the class methods
@@ -31,6 +36,13 @@ module Blink
@objects = Hash.new
@actions = Hash.new
}
+
+ if @@types.include?(sub.name)
+ Blink.notice("Redefining object type %s" % sub.name)
+ else
+ #Blink.debug("Defining object type %s" % sub.name)
+ end
+ @@types[sub.name] = sub
end
#-----------------------------------