Class: Rack::RPC::ProcCommand

Inherits:
Command
  • Object
show all
Defined in:
lib/rack/rpc/server.rb

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (ProcCommand) initialize(proc, options)

Returns a new instance of ProcCommand



93
94
95
96
# File 'lib/rack/rpc/server.rb', line 93

def initialize(proc, options)
  @proc = proc.to_proc
  super(options)
end

Instance Attribute Details

- (void) options (readonly) Originally defined in class Command

Returns the value of attribute options

Instance Method Details

- (void) call(server)



98
99
100
# File 'lib/rack/rpc/server.rb', line 98

def call(server)
  server.instance_eval(&@proc)
end