Skip to content

Instantly share code, notes, and snippets.

@jlindley
Created June 22, 2010 16:04
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save jlindley/448672 to your computer and use it in GitHub Desktop.
Save jlindley/448672 to your computer and use it in GitHub Desktop.
Do you think it is a good idea to do downcase and a == or is there a better way?
def nbde_new_evaluation_result(nbde_evaluation)
letter = nbde_evaluation.part1_test_result.downcase
if letter == "p"
"Pass"
elsif letter == "f"
"Fail"
else
"Unknown"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment