Class: Object
- Inherits:
- BasicObject
- Defined in:
- lib/arachni/ruby/object.rb
Overview
Overloads the Object class providing a #deep_clone method.
Instance Method Summary collapse
-
#deep_clone ⇒ Object
Deep-clones self using a Marshal dump-load.
- #to_rpc_data_or_self ⇒ Object
Instance Method Details
#deep_clone ⇒ Object
Deep-clones self using a Marshal dump-load.
18 19 20 |
# File 'lib/arachni/ruby/object.rb', line 18 def deep_clone Marshal.load( Marshal.dump( self ) ) end |
#to_rpc_data_or_self ⇒ Object
22 23 24 |
# File 'lib/arachni/ruby/object.rb', line 22 def to_rpc_data_or_self respond_to?( :to_rpc_data ) ? to_rpc_data : self end |