summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2005-04-13 20:45:50 +0000
committerLuke Kanies <luke@madstop.com>2005-04-13 20:45:50 +0000
commitcb785bdfe66c873be5fc27b3ee2b56196d6725f5 (patch)
tree0fcd90d03d276628eed1a50912a828d7eed6d38f /lib
parent8788552d5ec25c937bf2b609550fd024c31b1bc8 (diff)
downloadpuppet-cb785bdfe66c873be5fc27b3ee2b56196d6725f5.tar.gz
puppet-cb785bdfe66c873be5fc27b3ee2b56196d6725f5.tar.xz
puppet-cb785bdfe66c873be5fc27b3ee2b56196d6725f5.zip
moving client.rb to the library tree
git-svn-id: https://reductivelabs.com/svn/puppet/library/trunk@123 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib')
-rw-r--r--lib/blink/client.rb33
1 files changed, 33 insertions, 0 deletions
diff --git a/lib/blink/client.rb b/lib/blink/client.rb
new file mode 100644
index 000000000..79c49f367
--- /dev/null
+++ b/lib/blink/client.rb
@@ -0,0 +1,33 @@
+#!/usr/local/bin/ruby -w
+
+# $Id$
+
+# the available clients
+
+require 'blink'
+require 'blink/function'
+
+module Blink
+ class ClientError < RuntimeError; end
+ #---------------------------------------------------------------
+ class Client
+ attr_accessor :objects
+
+ class Local
+ def callfunc(name,*args)
+ if function = Blink::Function[name]
+ return function.call(*args)
+ else
+ return nil
+ end
+ end
+
+ def objects=(list)
+ list.each { |object|
+ # create a Blink object from the list...
+ }
+ end
+ end
+ end
+ #---------------------------------------------------------------
+end