Skip to content

Instantly share code, notes, and snippets.

@jsborjesson
Created June 3, 2015 09:38
Show Gist options
  • Select an option

  • Save jsborjesson/6a97e20577a79c5e32be to your computer and use it in GitHub Desktop.

Select an option

Save jsborjesson/6a97e20577a79c5e32be to your computer and use it in GitHub Desktop.
def x(one: 1, two: 2)
local_variables.each_with_object({}) do |var, memo| memo[var] = eval(var.to_s) end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment