Class: Spine::Transform::Commands::Copy

Inherits:
Object
  • Object
show all
Defined in:
lib/spine/transform/commands/copy.rb

Instance Method Summary collapse

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, options = {})
  @key = options.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