Skip to content

Instantly share code, notes, and snippets.

@lifo
Created November 7, 2008 13:14
Show Gist options
  • Save lifo/22858 to your computer and use it in GitHub Desktop.
Save lifo/22858 to your computer and use it in GitHub Desktop.
def hello(local_assigns)
locals_code = local_assigns.keys.map { |key| "#{key} = local_assigns[:#{key}];" }.join
# what goes here
puts dynamic_local_var
end
hello :dynamic_local_var => 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment