Class: Arachni::RPC::Client::Dispatcher

Inherits:
Object
  • Object
show all
Defined in:
lib/arachni/rpc/client/dispatcher.rb

Overview

RPC Dispatcher client

@author: Tasos “Zapotek” Laskos

<[email protected]>
<[email protected]>

@version: 0.1.3

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(opts, url) ⇒ Dispatcher

Returns a new instance of Dispatcher.



30
31
32
33
34
# File 'lib/arachni/rpc/client/dispatcher.rb', line 30

def initialize( opts, url )
    @client = Base.new( opts, url )

    @node = RemoteObjectMapper.new( @client, 'node' )
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



40
41
42
# File 'lib/arachni/rpc/client/dispatcher.rb', line 40

def method_missing( sym, *args, &block )
    @client.call( "dispatcher.#{sym.to_s}", *args, &block )
end

Instance Attribute Details

#nodeObject (readonly)

Returns the value of attribute node.



28
29
30
# File 'lib/arachni/rpc/client/dispatcher.rb', line 28

def node
  @node
end