Class: Rack::RPC::MethodCommand

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

Overview

ProcCommand

Instance Attribute Summary

Attributes inherited from Command

#options

Instance Method Summary collapse

Methods inherited from Command

#callable?

Constructor Details

#initialize(method, options) ⇒ MethodCommand

Returns a new instance of MethodCommand.



104
105
106
107
# File 'lib/rack/rpc/server.rb', line 104

def initialize(method, options)
  @method = method.to_sym
  super(options)
end

Instance Method Details

#call(server) ⇒ Object



109
110
111
# File 'lib/rack/rpc/server.rb', line 109

def call(server)
  server.__send__(@method)
end