diff options
author | Luke Kanies <luke@madstop.com> | 2005-04-21 19:34:31 +0000 |
---|---|---|
committer | Luke Kanies <luke@madstop.com> | 2005-04-21 19:34:31 +0000 |
commit | 7df572bbdc533b352ff90a137bbfb57045c97c16 (patch) | |
tree | 22539dc95bdcde909dadf0fa802f8be26dc812ac | |
parent | 565554f47dccca357560ba96336b8bd4e3d2afe1 (diff) | |
download | puppet-7df572bbdc533b352ff90a137bbfb57045c97c16.tar.gz puppet-7df572bbdc533b352ff90a137bbfb57045c97c16.tar.xz puppet-7df572bbdc533b352ff90a137bbfb57045c97c16.zip |
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
-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 |