Module: Duration::Common

Included in:
Days, Hours, Milliseconds, Minutes, Months, Seconds, Weeks
Defined in:
lib/Duration/Common.rb

Instance Method Summary collapse

Instance Method Details

#agoObject



6
7
8
# File 'lib/Duration/Common.rb', line 6

def ago
  Time.now - self.to_seconds.to_f
end

#henceObject



10
11
12
# File 'lib/Duration/Common.rb', line 10

def hence
  Time.now + self.to_seconds.to_f
end