-
-
Save kalupa/3995969 to your computer and use it in GitHub Desktop.
how to determine one name vs another..
This file contains hidden or 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 make_selection | |
selections = [] | |
1000.times { selections << ["manage", "settings"].sample } | |
selections.select { |s| s == "manage" }.size > selections.select { |s| s == "settings" }.size ? "manage" : "settings" | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment