Module: Core::Copy
- Extended by:
- Local
- Defined in:
- lib/core/copy.rb,
lib/core/copy/version.rb
Overview
[public]
Constant Summary collapse
- DEFAULT =
Object.new
- VERSION =
"0.3.0"
Class Method Summary collapse
- .copied_objects ⇒ Object
- .copying?(object) ⇒ Boolean
- .prevent_recursion(object) ⇒ Object
- .version ⇒ Object
Class Method Details
.copied_objects ⇒ Object
83 84 85 |
# File 'lib/core/copy.rb', line 83 def copied_objects localized(:__corerb_copied_objects__) || localize(:__corerb_copied_objects__, {}) end |
.copying?(object) ⇒ Boolean
79 80 81 |
# File 'lib/core/copy.rb', line 79 def (object) copied_objects[object.object_id] end |
.prevent_recursion(object) ⇒ Object
71 72 73 74 75 76 77 |
# File 'lib/core/copy.rb', line 71 def prevent_recursion(object) object_id = object.object_id copied_objects[object_id] = true yield ensure copied_objects.delete(object_id) end |
.version ⇒ Object
7 8 9 |
# File 'lib/core/copy/version.rb', line 7 def self.version VERSION end |