lib/table_sync/config.rb in table_sync-2.2.0 vs lib/table_sync/config.rb in table_sync-2.3.0
- old
+ new
@@ -42,10 +42,10 @@
# get named parameters (parameters with :keyreq) from proc-value
params = block.parameters.map { |param| param[0] == :keyreq ? param[1] : nil }.compact
# wrapper for proc-value, this wrapper receives all params (model, version, project_id...)
# and filters them for proc-value
- unified_block = proc { |hash = {}| block.call(hash.slice(*params)) }
+ unified_block = proc { |hash = {}| block.call(**hash.slice(*params)) }
# set wrapped proc-value as ivar value
instance_variable_set(ivar, unified_block)
else # case for config.option(args)
# call option_block with args as params and set ivar to result