Skip to content

Instantly share code, notes, and snippets.

@trueheart78
Created April 18, 2023 16:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trueheart78/638cb5d083f38e4756b28774c9f69162 to your computer and use it in GitHub Desktop.
Save trueheart78/638cb5d083f38e4756b28774c9f69162 to your computer and use it in GitHub Desktop.
WoW Character Name Checker (local)
#!/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