Class: Capricorn::Server::Proxy
- Inherits:
-
Object
- Object
- Capricorn::Server::Proxy
- Defined in:
- lib/capricorn/server/proxy.rb
Overview
the proxy object hides all the server internals from the clients.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(server) ⇒ Proxy
constructor
A new instance of Proxy.
Constructor Details
#initialize(server) ⇒ Proxy
Returns a new instance of Proxy.
7 8 9 |
# File 'lib/capricorn/server/proxy.rb', line 7 def initialize(server) @server = server end |
Class Method Details
.allow(*methods) ⇒ Object
11 12 13 14 15 |
# File 'lib/capricorn/server/proxy.rb', line 11 def self.allow(*methods) methods.each do |method| module_eval %{ def #{method}(*args,&block) ; @server.#{method}(*args,&block) ; end } end end |