diff options
-rw-r--r-- | lib/blink/type.rb | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/lib/blink/type.rb b/lib/blink/type.rb index 50061047d..859005574 100644 --- a/lib/blink/type.rb +++ b/lib/blink/type.rb @@ -38,6 +38,10 @@ class Blink::Type < Blink::Element @@allobjects = Array.new # an array for all objects @abstract = true + @name = :blink # a little fakery, since Blink itself isn't a type + + @allowedmethods = [:noop,:debug] + #--------------------------------------------------------------- #--------------------------------------------------------------- # class methods dealing with Type management @@ -50,7 +54,7 @@ class Blink::Type < Blink::Element # called before the <subclass>.name method is defined, we need # to store each class in an array, and then later actually iterate # across that array and make a map - @@typeary = [] + @@typeary = [self] @@typehash = Hash.new { |hash,key| if key.is_a?(String) key = key.intern @@ -87,6 +91,18 @@ class Blink::Type < Blink::Element #--------------------------------------------------------------- #--------------------------------------------------------------- + def noop(ary) + Blink[:noop] = ary.shift + end + #--------------------------------------------------------------- + + #--------------------------------------------------------------- + def debug(ary) + Blink[:debug] = ary.shift + end + #--------------------------------------------------------------- + + #--------------------------------------------------------------- # this is meant to be run multiple times, e.g., when a new # type is defined at run-time def Type.buildtypehash |