Module: NumericExtensions

Defined in:
lib/duration_extensions.rb

Instance Method Summary collapse

Instance Method Details

#ordinalObject



67
68
69
# File 'lib/duration_extensions.rb', line 67

def ordinal
  to_s + ([[nil, 'st','nd','rd'],[]][self / 10 == 1 && 1 || 0][self % 10] || 'th')
end

#to_timecodeObject Also known as: timecode



70
71
72
# File 'lib/duration_extensions.rb', line 70

def to_timecode
  seconds.timecode
end