DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
Create And Set Instance Variables From Method Parameters / Arguments
Inserted at the top of the method body, this line creates instance variables for each of the method parameters and sets them to their respective argument values.
local_variables.each { |v| eval("@#{v}=eval(v)") }





