class Macros::Ctx::Copy
Public Class Methods
new(origin_key, destination_key)
click to toggle source
# File lib/macros/ctx/copy.rb, line 6 def initialize(origin_key, destination_key) @origin_key = origin_key @destination_key = destination_key end
Public Instance Methods
call(ctx, **)
click to toggle source
# File lib/macros/ctx/copy.rb, line 11 def call(ctx, **) return false unless ctx[@origin_key] ctx[@destination_key] = ctx[@origin_key] end