Class: Time

Inherits:
Object
  • Object
show all
Defined in:
lib/droom/monkeys.rb

Instance Method Summary collapse

Instance Method Details

#ceil(seconds = 60) ⇒ Object



16
17
18
# File 'lib/droom/monkeys.rb', line 16

def ceil(seconds = 60)
  Time.at((self.to_f / seconds).ceil * seconds)
end

#floor(seconds = 60) ⇒ Object



20
21
22
# File 'lib/droom/monkeys.rb', line 20

def floor(seconds = 60)
  Time.at((self.to_f / seconds).floor * seconds)
end