What module(s) do I need to include to get 5.seconds to work in Ruby?

Posted by DJTripleThreat on Stack Overflow See other posts from Stack Overflow or by DJTripleThreat
Published on 2010-05-21T18:37:22Z Indexed on 2010/05/21 18:40 UTC
Read the original article Hit count: 201

Filed under:
|
|

Because apparently require 'date' doesn't include the method hours or seconds etc:

undefined method `hours' for 5:Fixnum (NoMethodError)

Am I missing something? Is 5.seconds only something you can do in Rails? If so, what is the require statement I need to get this to work in a ruby script?

© Stack Overflow or respective owner

Related posts about ruby

Related posts about datetime