summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2005-05-16 15:22:32 +0000
committerLuke Kanies <luke@madstop.com>2005-05-16 15:22:32 +0000
commit259692cf20e7fa54094d995da2fd168036edbcca (patch)
treeee0f161901e1cf322e06f8ffe172de89a34267ea /lib
parent3b3373830c7238e26a4454334296c5b49368b3a4 (diff)
downloadpuppet-259692cf20e7fa54094d995da2fd168036edbcca.tar.gz
puppet-259692cf20e7fa54094d995da2fd168036edbcca.tar.xz
puppet-259692cf20e7fa54094d995da2fd168036edbcca.zip
moving
git-svn-id: https://reductivelabs.com/svn/puppet/library/trunk@247 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib')
-rw-r--r--lib/blink/transportable.rb65
1 files changed, 65 insertions, 0 deletions
diff --git a/lib/blink/transportable.rb b/lib/blink/transportable.rb
new file mode 100644
index 000000000..101d8d29f
--- /dev/null
+++ b/lib/blink/transportable.rb
@@ -0,0 +1,65 @@
+#!/usr/local/bin/ruby -w
+
+# $Id$
+
+# the interpreter
+#
+# this builds our virtual pinball machine, into which we'll place our host-specific
+# information and out of which we'll receive our host-specific configuration
+
+require 'blink'
+require 'blink/parser/parser'
+
+
+module Blink
+ module Parser
+ #------------------------------------------------------------
+ class TransObject < Hash
+ attr_accessor :type
+
+ @@ohash = {}
+ @@oarray = []
+
+ def TransObject.clear
+ @@oarray.clear
+ end
+
+ def TransObject.list
+ return @@oarray
+ end
+
+ def initialize(name,type)
+ self[:name] = name
+ @type = type
+ #if @@ohash.include?(name)
+ # raise "%s already exists" % name
+ #else
+ # @@ohash[name] = self
+ # @@oarray.push(self)
+ #end
+ @@oarray.push self
+ end
+
+ def name
+ return self[:name]
+ end
+
+ def to_s
+ return "%s(%s) => %s" % [@type,self[:name],super]
+ end
+ end
+ #------------------------------------------------------------
+
+ #------------------------------------------------------------
+ class TransSetting
+ attr_accessor :type, :name, :args
+ end
+ #------------------------------------------------------------
+
+ #------------------------------------------------------------
+ # just a linear container for objects
+ class TransBucket < Array
+ end
+ #------------------------------------------------------------
+ end
+end