Skip to content

Instantly share code, notes, and snippets.

@cadwallion
Created December 26, 2011 23:04
Show Gist options
  • Save cadwallion/1522260 to your computer and use it in GitHub Desktop.
Save cadwallion/1522260 to your computer and use it in GitHub Desktop.
What is this I don't even...
def prepare_vars #:nodoc:
h = eval(%q{instance_variables.map {|var| "#{var.gsub("@",":")} => #{eval(var+'.inspect')}"}.join(", ").chomp(", ")})
return eval("{#{h}}")
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment