Class: Object

Inherits:
BasicObject
Defined in:
lib/andromeda/copy_clone.rb

Instance Method Summary collapse

Instance Method Details

#clone_to_copy?Boolean

Returns:

  • (Boolean)


12
# File 'lib/andromeda/copy_clone.rb', line 12

def clone_to_copy? ; cloneable? end

#cloneable?Boolean

Returns:

  • (Boolean)


13
# File 'lib/andromeda/copy_clone.rb', line 13

def cloneable? ; nil end

#identical_copyObject



5
6
7
8
9
10
# File 'lib/andromeda/copy_clone.rb', line 5

def identical_copy
  case clone_to_copy?
  when false then self
  when true then clone
  else clone rescue self end
end