Module: Y2Network::CanBeCopied

Included in:
Config, Y2Network::ConnectionConfig::IPConfig, Driver, InterfacesCollection
Defined in:
src/lib/y2network/can_be_copied.rb

Overview

This module adds a #copy method.

Instance Method Summary collapse

Instance Method Details

#copyObject

Returns a deep-copy of the configuration


24
25
26
# File 'src/lib/y2network/can_be_copied.rb', line 24

def copy
  Marshal.load(Marshal.dump(self))
end