diff options
author | Luke Kanies <luke@madstop.com> | 2005-04-14 04:18:25 +0000 |
---|---|---|
committer | Luke Kanies <luke@madstop.com> | 2005-04-14 04:18:25 +0000 |
commit | e5676ab347399a1f32e77bf4f64eaa73d54a895b (patch) | |
tree | eadcaac0f517c8bf4c41d59d29d94e845d803bd2 /lib/blink/objects.rb | |
parent | f3d11185d9d5f8c5d4cdb7945d41564ddd782c7e (diff) | |
download | puppet-e5676ab347399a1f32e77bf4f64eaa73d54a895b.tar.gz puppet-e5676ab347399a1f32e77bf4f64eaa73d54a895b.tar.xz puppet-e5676ab347399a1f32e77bf4f64eaa73d54a895b.zip |
testing keyword
git-svn-id: https://reductivelabs.com/svn/puppet/library/trunk@148 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib/blink/objects.rb')
-rw-r--r-- | lib/blink/objects.rb | 16 |
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 #----------------------------------- |