Class: Architecture::Copy
- Inherits:
-
Object
- Object
- Architecture::Copy
- Includes:
- Contentable, Replicatable
- Defined in:
- lib/architecture/copy.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(source:, destination:, context: {}) ⇒ Copy
constructor
A new instance of Copy.
Constructor Details
Instance Method Details
#call ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/architecture/copy.rb', line 12 def call if origin.file? && context.any? clone.write(text: data) else origin.copy(entity: clone) end end |