Last active
August 29, 2015 14:07
-
-
Save matstc/3d933b340da467c8f352 to your computer and use it in GitHub Desktop.
Example of an eager definition
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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