Class: Arachni::RPC::XML::Client::Instance::Mapper

Inherits:
Object
  • Object
show all
Defined in:
lib/rpc/xml/client/instance.rb

Overview

Maps the methods of remote objects to local ones

Direct Known Subclasses

OptsMapper

Instance Method Summary collapse

Constructor Details

#initialize(server, remote) ⇒ Mapper

Returns a new instance of Mapper.



43
44
45
46
# File 'lib/rpc/xml/client/instance.rb', line 43

def initialize( server, remote )
    @server = server
    @remote = remote
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(sym, *args, &block) ⇒ Object (private)

Used to provide the illusion of locality for remote methods



52
53
54
55
# File 'lib/rpc/xml/client/instance.rb', line 52

def method_missing( sym, *args, &block )
    call = "#{@remote}.#{sym.to_s}"
    @server.call( call, *args )
end