Skip to content

Instantly share code, notes, and snippets.

@konn
Created April 28, 2010 14:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save konn/382250 to your computer and use it in GitHub Desktop.
Save konn/382250 to your computer and use it in GitHub Desktop.
def copy_instance_val(targ)
targ.instance_variables.each{|a| instance_variable_set(a, targ.instance_variable_get(a))}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment