Class: Arachni::OptionGroups::Datastore

Inherits:
Arachni::OptionGroup show all
Defined in:
lib/arachni/option_groups/datastore.rb

Overview

Generic OpenStruct-based class for general purpose data storage.

Author:

Instance Method Summary collapse

Methods inherited from Arachni::OptionGroup

#==, attr_accessor, attributes, #attributes, #defaults, defaults, #hash, #merge, set_defaults, #to_hash, #to_rpc_data, #update, #validate

Constructor Details

#initializeDatastore

Returns a new instance of Datastore.


18
19
20
# File 'lib/arachni/option_groups/datastore.rb', line 18

def initialize
    @source = OpenStruct.new
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args, &block) ⇒ Object


22
23
24
# File 'lib/arachni/option_groups/datastore.rb', line 22

def method_missing( method, *args, &block )
    @source.send( method, *args, &block )
end

Instance Method Details

#to_hObject


26
27
28
# File 'lib/arachni/option_groups/datastore.rb', line 26

def to_h
    @source.marshal_dump
end