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.
92 93 94 95 |
# File 'lib/rack/rpc/server.rb', line 92 def initialize(proc, ) @proc = proc.to_proc super() end |
Instance Method Details
#call(server) ⇒ Object
97 98 99 |
# File 'lib/rack/rpc/server.rb', line 97 def call(server) server.instance_eval(&@proc) end |