Class: Rack::RPC::ProcCommand
Instance Attribute Summary
Attributes inherited from Command
Instance Method Summary collapse
- #call(server) ⇒ Object
-
#initialize(proc, options) ⇒ ProcCommand
constructor
A new instance of ProcCommand.
Methods inherited from Command
Constructor Details
#initialize(proc, options) ⇒ ProcCommand
Returns a new instance of ProcCommand.
93 94 95 96 |
# File 'lib/rack/rpc/server.rb', line 93 def initialize(proc, ) @proc = proc.to_proc super() end |
Instance Method Details
#call(server) ⇒ Object
98 99 100 |
# File 'lib/rack/rpc/server.rb', line 98 def call(server) server.instance_eval(&@proc) end |