From 00a620de88c593ffe841121c3a2e19504380b669 Mon Sep 17 00:00:00 2001 From: Luke Kanies Date: Mon, 16 May 2005 16:50:37 +0000 Subject: unmoving git-svn-id: https://reductivelabs.com/svn/puppet/library/trunk@250 980ebf18-57e1-0310-9a29-db15c13687c0 --- lib/blink/type/component.rb | 39 +++++++++++++++++++++++++++++++++++++++ lib/blink/type/container.rb | 39 --------------------------------------- 2 files changed, 39 insertions(+), 39 deletions(-) create mode 100644 lib/blink/type/component.rb delete mode 100644 lib/blink/type/container.rb (limited to 'lib') diff --git a/lib/blink/type/component.rb b/lib/blink/type/component.rb new file mode 100644 index 000000000..7d289e45f --- /dev/null +++ b/lib/blink/type/component.rb @@ -0,0 +1,39 @@ +#!/usr/local/bin/ruby -w + +# $Id$ + +# the object allowing us to build complex structures +# this thing contains everything else, including itself + +require 'blink' +require 'blink/element' +require 'blink/transaction' +require 'blink/type' + +module Blink + class Container < Blink::Element + @name = :container + + def initialize + @children = [] + end + + # now we decide whether a transaction is dumb, and just accepts + # changes from the container, or whether it collects them itself + # for now, because i've already got this implemented, let transactions + # collect the changes themselves + def evaluate + return transaction = Blink::Transaction.new(@children) + #transaction.run + end + + def push(*ary) + ary.each { |child| + unless child.is_a?(Blink::Element) + raise "Containers can only contain Blink::Elements" + end + @children.push child + } + end + end +end diff --git a/lib/blink/type/container.rb b/lib/blink/type/container.rb deleted file mode 100644 index 7d289e45f..000000000 --- a/lib/blink/type/container.rb +++ /dev/null @@ -1,39 +0,0 @@ -#!/usr/local/bin/ruby -w - -# $Id$ - -# the object allowing us to build complex structures -# this thing contains everything else, including itself - -require 'blink' -require 'blink/element' -require 'blink/transaction' -require 'blink/type' - -module Blink - class Container < Blink::Element - @name = :container - - def initialize - @children = [] - end - - # now we decide whether a transaction is dumb, and just accepts - # changes from the container, or whether it collects them itself - # for now, because i've already got this implemented, let transactions - # collect the changes themselves - def evaluate - return transaction = Blink::Transaction.new(@children) - #transaction.run - end - - def push(*ary) - ary.each { |child| - unless child.is_a?(Blink::Element) - raise "Containers can only contain Blink::Elements" - end - @children.push child - } - end - end -end -- cgit