Never been to DZone Snippets before?

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

« Newer Snippets
Older Snippets »
Showing 1-1 of 1 total  RSS 

parameterized instance variables

// useful when you want to obtain more than one instance of the same type of variable on the
// same page. i.e. two different addresses. credit goes to argv[0] in #rubyonrails on freenode

instance_variable_get("@#{address_type}_address").country.name
« Newer Snippets
Older Snippets »
Showing 1-1 of 1 total  RSS