Class: Time
- Inherits:
-
Object
- Object
- Time
- Defined in:
- lib/dnotify.rb
Instance Method Summary collapse
Instance Method Details
#floor(seconds = 60) ⇒ Object
86 87 88 |
# File 'lib/dnotify.rb', line 86 def floor(seconds = 60) Time.at((self.to_f / seconds).floor * seconds) end |
#round(seconds = 60) ⇒ Object
82 83 84 |
# File 'lib/dnotify.rb', line 82 def round(seconds = 60) Time.at((self.to_f / seconds).round * seconds) end |