Class: Arachni::RPC::Server::ActiveOptions

Inherits:
Object
  • Object
show all
Defined in:
lib/arachni/rpc/server/active_options.rb

Overview

It, for the most part, forwards calls to Options and intercepts a few that need to be updated at other places throughout the framework.

Author:

Instance Method Summary collapse

Constructor Details

#initialize(framework) ⇒ ActiveOptions

Returns a new instance of ActiveOptions.



20
21
22
23
24
25
26
27
28
29
30
# File 'lib/arachni/rpc/server/active_options.rb', line 20

def initialize( framework )
    @options = framework.options

    (@options.public_methods( false ) - public_methods( false ) ).each do |m|
        self.class.class_eval do
            define_method m do |*args|
                @options.send( m, *args )
            end
        end
    end
end

Instance Method Details

#set(options) ⇒ Object

See Also:



33
34
35
36
37
# File 'lib/arachni/rpc/server/active_options.rb', line 33

def set( options )
    @options.set( options )
    HTTP::Client.reset false
    true
end

#to_hObject



39
40
41
# File 'lib/arachni/rpc/server/active_options.rb', line 39

def to_h
    @options.to_rpc_data
end