Skip to content

Instantly share code, notes, and snippets.

@yosmoc
Created July 27, 2008 00:56
Show Gist options
  • Save yosmoc/2706 to your computer and use it in GitHub Desktop.
Save yosmoc/2706 to your computer and use it in GitHub Desktop.
def default_value
p 'generate default_value'
'default value'
end
def some_method(param = nil)
param ||= default_value
p param
end
some_method
some_method('hello')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment