lib/texp/base.rb
# Return the ordinal abbreviation for the integer +n+.  (e.g. 1 =>
# "1st", 3 => "3rd")
Return the ordinal abbreviation for the integer +n+.
Return the ordinal abbreviation for the integer + n + .
def ordinal(n)
      if n == -1
        "last"
      elsif n == -2
        "next to the last"
      elsif n < 0
        ordinal(-n) + " from the last"
      else
        n.to_s + suffix(n)
      end        
    end
def ordinal ( n ) if n == - 1 "last" elsif n == - 2 "next to the last" elsif n < 0 ordinal ( - n ) + " from the last" else n . to_s + suffix ( n ) end end
Return the ordinal abbreviation for the integer +n+.
Return the ordinal abbreviation for the integer + n + .
n
<not_specific>