Created
April 18, 2023 16:20
-
-
Save trueheart78/638cb5d083f38e4756b28774c9f69162 to your computer and use it in GitHub Desktop.
WoW Character Name Checker (local)
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
#!/usr/bin/env ruby | |
require "colorize" | |
def wow_name(string) | |
fits = string.size <= 12 | |
if fits | |
"=> \"#{string.downcase.capitalize}\" fits and would make a great name! ✅".green | |
else | |
# cutoff = string[0...12] | |
"=> \"#{string.downcase.capitalize}\" does not fit (#{string.size - 12} over). ❌".red | |
end | |
end | |
if ARGV.none? | |
puts "Error: Missing Branch Details".red | |
exit 1 | |
end | |
puts wow_name(ARGV.first) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment