Skip to content

Instantly share code, notes, and snippets.

@bussiere
Created August 13, 2010 09:04
Show Gist options
  • Save bussiere/522579 to your computer and use it in GitHub Desktop.
Save bussiere/522579 to your computer and use it in GitHub Desktop.
#Made by the guys at ruby apero
#instancing default parameter and passing specific parameter
def toto(params={})
p default.merge(params)
end
def default
{:titi => 1, :tata =>2}
end
toto({:tata=>3})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment