Class: Time

Inherits:
Object
  • Object
show all
Defined in:
lib/time_win/time_ext.rb

Instance Method Summary collapse

Instance Method Details

#during(duration) ⇒ Object



2
3
4
# File 'lib/time_win/time_ext.rb', line 2

def during duration
  TimeWin::Window.new self, (self + duration)
end

#from(time) ⇒ Object



8
9
10
# File 'lib/time_win/time_ext.rb', line 8

def from time
  TimeWin::Window.new time.to_time, self
end

#to(time) ⇒ Object Also known as: until



5
6
7
# File 'lib/time_win/time_ext.rb', line 5

def to time
  TimeWin::Window.new self, time.to_time
end