Class: Arachni::OptionGroups::Datastore
- Inherits:
-
Arachni::OptionGroup
- Object
- Arachni::OptionGroup
- Arachni::OptionGroups::Datastore
- Defined in:
- lib/arachni/option_groups/datastore.rb
Overview
Generic OpenStruct-based class for general purpose data storage.
Instance Method Summary collapse
-
#initialize ⇒ Datastore
constructor
A new instance of Datastore.
- #method_missing(method, *args, &block) ⇒ Object
- #to_h ⇒ Object
Methods inherited from Arachni::OptionGroup
#==, attr_accessor, attributes, #attributes, defaults, #defaults, #hash, inherited, #merge, set_defaults, #to_hash, #to_rpc_data, #update, #validate
Constructor Details
#initialize ⇒ Datastore
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_h ⇒ Object
26 27 28 |
# File 'lib/arachni/option_groups/datastore.rb', line 26 def to_h @source.marshal_dump end |