Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
class Integer
def to_ord
self.to_s + ((10...20) === self ? 'th' : %w{th st nd rd th th th th th th}[int % 10])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.