lib/type_contracts/annotations.rb
# Removes values for named params from `kwargs` and appends them to `args`.
Removes values for named params from `kwargs` and appends them to `args`.
Removes values for named params from ` kwargs ` and appends them to ` args ` .
def move_named_param_from_kwargs(args, kwargs)
        kwarg_removal_index = -1
        kwargs.each_with_index do |(name, value), index|
          if @params[name] == :key && index == kwarg_removal_index + 1
            args << value
            kwarg_removal_index += 1
          else
            break
          end
        end
        delete_count = -1
        kwargs.delete_if do
          (delete_count += 1) <= kwarg_removal_index
        end
      end
def move_named_param_from_kwargs ( args , kwargs ) kwarg_removal_index = - 1 kwargs . each_with_index do | ( name , value ) , index | if @params [ name ] == :key && index == kwarg_removal_index + 1 args << value kwarg_removal_index += 1 else break end end delete_count = - 1 kwargs . delete_if do ( delete_count += 1 ) <= kwarg_removal_index end end
Removes values for named params from `kwargs` and appends them to `args`.
Removes values for named params from ` kwargs ` and appends them to ` args ` .
args
kwargs