Class: Spine::Transform::Commands::Copy
- Inherits:
-
Object
- Object
- Spine::Transform::Commands::Copy
- Defined in:
- lib/spine/transform/commands/copy.rb
Instance Method Summary collapse
- #execute(destination, value) ⇒ Object
-
#initialize(key, options = {}) ⇒ Copy
constructor
A new instance of Copy.
Constructor Details
#initialize(key, options = {}) ⇒ Copy
Returns a new instance of Copy.
5 6 7 |
# File 'lib/spine/transform/commands/copy.rb', line 5 def initialize(key, = {}) @key = .fetch(:to, key) end |
Instance Method Details
#execute(destination, value) ⇒ Object
9 10 11 |
# File 'lib/spine/transform/commands/copy.rb', line 9 def execute(destination, value) destination[@key] = value end |