jsonrpc2.0 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- data/jsonrpc2.0.gemspec +1 -1
- data/lib/jsonrpc2.0/Server.rb +5 -3
- metadata +1 -1
data/jsonrpc2.0.gemspec
CHANGED
data/lib/jsonrpc2.0/Server.rb
CHANGED
@@ -35,11 +35,13 @@ class JsonRpcServer
|
|
35
35
|
raise InvalidRequest if (!inRequest.key?('method'))
|
36
36
|
|
37
37
|
begin
|
38
|
-
|
39
|
-
|
40
|
-
|
38
|
+
methodName = 'r_' + inRequest['method']
|
39
|
+
|
40
|
+
unless restrictMethod == nil or restrictMethod == methodName
|
41
41
|
raise MethodNotAllowed
|
42
42
|
end
|
43
|
+
|
44
|
+
method = method(methodName)
|
43
45
|
|
44
46
|
params = inRequest['params']
|
45
47
|
result = method.call(*params)
|