From 7df572bbdc533b352ff90a137bbfb57045c97c16 Mon Sep 17 00:00:00 2001 From: Luke Kanies Date: Thu, 21 Apr 2005 19:34:31 +0000 Subject: removing most functionality, since type.rb already has it git-svn-id: https://reductivelabs.com/svn/puppet/library/trunk@208 980ebf18-57e1-0310-9a29-db15c13687c0 --- lib/blink/component.rb | 51 ++------------------------------------------------ 1 file 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 -- cgit