diff options
Diffstat (limited to 'lib/blink/component.rb')
-rw-r--r-- | lib/blink/component.rb | 51 |
1 files changed, 2 insertions, 49 deletions
diff --git a/lib/blink/component.rb b/lib/blink/component.rb index 62481f000..d0b23a622 100644 --- a/lib/blink/component.rb +++ b/lib/blink/component.rb @@ -13,56 +13,9 @@ module Blink @name = :component @namevar = :name - @params = [ + + @parameters = [ :name ] - - #--------------------------------------------------------------- - def [](object) - @subobjects[object] - end - #--------------------------------------------------------------- - - #--------------------------------------------------------------- - # our components are effectively arrays, with a bit extra functionality - def each - @subobjects.each { |obj| - yield obj - } - end - #--------------------------------------------------------------- - - #--------------------------------------------------------------- - def initialize(hash) - #super(hash) - begin - @name = hash[:name] - rescue - fail TypeError.new("Components must be provided a name") - end - - unless @name - fail TypeError.new("Components must be provided a name") - end - - self.class[self.name] = self - - @subobjects = [] - end - #--------------------------------------------------------------- - - #--------------------------------------------------------------- - def push(*objs) - objs.each { |obj| - @subobjects.push(obj) - } - end - #--------------------------------------------------------------- - - #--------------------------------------------------------------- - #def to_s - # return self.name - #end - #--------------------------------------------------------------- end end |