Method: Timecode#coerce

Defined in:
lib/timecode.rb

#coerce(to) ⇒ Object



292
293
294
295
296
297
298
299
300
301
302
303
304
# File 'lib/timecode.rb', line 292

def coerce(to)
  me = case to
    when String
      to_s
    when Integer
      to_i
    when Float
      to_f
    else
      self
  end
  [me, to]
end