module Ordinals

Public Instance Methods

ordinal() click to toggle source
# File lib/event_nlp.rb, line 14
def ordinal
  self.to_s + ( (10...20).include?(self) ? 'th' : 
                %w{ th st nd rd th th th th th th }[self % 10] )
end