Class: Msf::RPC::JSON::V2_0::RpcTest
- Inherits:
-
Object
- Object
- Msf::RPC::JSON::V2_0::RpcTest
- Defined in:
- lib/msf/core/rpc/json/v2_0/rpc_test.rb
Overview
Receiver class for demonstration RPC version 2.0.
Class Method Summary collapse
Instance Method Summary collapse
- #add_instance_rand_num(x) ⇒ Object
- #get_instance_rand_num ⇒ Object
-
#initialize ⇒ RpcTest
constructor
A new instance of RpcTest.
Constructor Details
#initialize ⇒ RpcTest
Returns a new instance of RpcTest.
5 6 7 8 |
# File 'lib/msf/core/rpc/json/v2_0/rpc_test.rb', line 5 def initialize r = Random.new @rand_num = r.rand(0..100) end |
Class Method Details
.add(x, y) ⇒ Object
10 11 12 |
# File 'lib/msf/core/rpc/json/v2_0/rpc_test.rb', line 10 def self.add(x, y) x + y end |
Instance Method Details
#add_instance_rand_num(x) ⇒ Object
18 19 20 21 22 |
# File 'lib/msf/core/rpc/json/v2_0/rpc_test.rb', line 18 def add_instance_rand_num(x) @rand_num = @rand_num + x @rand_num end |
#get_instance_rand_num ⇒ Object
14 15 16 |
# File 'lib/msf/core/rpc/json/v2_0/rpc_test.rb', line 14 def get_instance_rand_num @rand_num end |