Module: NumericExtensions
- Defined in:
- lib/duration_extensions.rb
Instance Method Summary collapse
- #ordinal ⇒ Object
- #to_timecode ⇒ Object (also: #timecode)
Instance Method Details
#ordinal ⇒ Object
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_timecode ⇒ Object Also known as: timecode
70 71 72 |
# File 'lib/duration_extensions.rb', line 70 def to_timecode seconds.timecode end |