Skip to content

Instantly share code, notes, and snippets.

@matstc
Last active August 29, 2015 14:07
Show Gist options
  • Save matstc/3d933b340da467c8f352 to your computer and use it in GitHub Desktop.
Save matstc/3d933b340da467c8f352 to your computer and use it in GitHub Desktop.
Example of an eager definition
def greet user
title = if user.admin?
"sir"
else
"you"
end
"Hello, #{title}!"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment