Sha256: cc81feef7a30b06f2de703ec163ade40c5d7c65490596e79c4c97f5236174780
Contents?: true
Size: 717 Bytes
Versions: 1
Compression:
Stored size: 717 Bytes
Contents
module Capricorn class Server # the proxy object hides all the server internals from the clients. class Proxy def initialize(server) @server = server end def self.allow(*methods) methods.each do |method| module_eval %{ def #{method}(*args,&block) ; @server.#{method}(*args,&block) ; end } end end allow :stop_server, :restart_server, :reload_server, :server_version, :update_server, :install_satellite, :uninstall_satellite, :install_engine, :update_engine, :uninstall_engine, :satellites, :queued_jobs, :cancel_job, :immediate_job class << self undef_method :allow end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
simonmenke-capricorn-0.2.00 | lib/capricorn/server/proxy.rb |