-
-
Save headius/35fc8585d67fea8c9930 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
i = offset into args | |
for arg in pre | |
arg.assign args[i] | |
i++ | |
end | |
while i + post.length < args.length | |
opt.assign args[i] | |
i++ | |
end | |
for arg in post | |
arg.assign args[i] | |
i++ | |
end | |
args_end = args.length | |
if i < args.length | |
if kwargs | |
args_end = args.length - 1 | |
kwargs.assign args[args_end] | |
end | |
rest = args.slice(i, args_end) | |
end | |
rest = slice args at i |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment