Module: Tablesalt::Isolation::ClassMethods
- Defined in:
- lib/tablesalt/isolation.rb
Instance Method Summary collapse
-
#isolate(obj) ⇒ Object
Dupes an item if possible.
Instance Method Details
#isolate(obj) ⇒ Object
Dupes an item if possible. Classes/modules can have unpredictable effects when duped, so they are not.
16 17 18 19 20 |
# File 'lib/tablesalt/isolation.rb', line 16 def isolate(obj) return obj if obj.is_a?(Module) obj.clone end |