Sha256: 583226c310491bb036a108a770b4ed68c963dd5dd7df1c5169009513b7d94d21
Contents?: true
Size: 733 Bytes
Versions: 7
Compression:
Stored size: 733 Bytes
Contents
=begin Copyright 2010-2014 Tasos Laskos <tasos.laskos@arachni-scanner.com> This file is part of the Arachni Framework project and is subject to redistribution and commercial restrictions. Please see the Arachni Framework web site for more information on licensing and terms of use. =end # Overloads the {Object} class providing a {#deep_clone} method. # # @author Tasos "Zapotek" Laskos <tasos.laskos@arachni-scanner.com> class Object # Deep-clones self using a Marshal dump-load. # # @return [Object] # Duplicate of self. def deep_clone Marshal.load( Marshal.dump( self ) ) end def to_rpc_data_or_self respond_to?( :to_rpc_data ) ? to_rpc_data : self end end
Version data entries
7 entries across 7 versions & 1 rubygems