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
-
#duplicable? ⇒ Boolean
Can you safely .dup this object? False for nil, false, true, symbols, numbers, and class objects; true otherwise.
Instance Method Details
#duplicable? ⇒ Boolean
Can you safely .dup this object? False for nil, false, true, symbols, numbers, and class objects; true otherwise.
28 29 30 |
# File 'lib/instance/duplicable.rb', line 28 def duplicable? true end |