Class: Object

Inherits:
BasicObject
Defined in:
lib/instance/duplicable.rb

Overview

Code taken from RAILS which allows checking whether ‘.dup’ can be called on an arbitrary object

Instance Method Summary collapse

Instance Method Details

#duplicable?Boolean

Can you safely .dup this object? False for nil, false, true, symbols, numbers, and class objects; true otherwise.

Returns:



28
29
30
# File 'lib/instance/duplicable.rb', line 28

def duplicable?
  true
end