Skip to content

Instantly share code, notes, and snippets.

@alekst
Created January 30, 2014 21:12
Show Gist options
  • Save alekst/8718761 to your computer and use it in GitHub Desktop.
Save alekst/8718761 to your computer and use it in GitHub Desktop.
class Numeric # converts numbers into letters
Alph = ("A".."Z").to_a
def alph
s, q = "", self
(q, r = (q - 1).divmod(26)) && s.prepend(Alph[r]) until q.zero?
s
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment