Method: RubyUnits::Unit#to_time

Defined in:
lib/ruby_units/unit.rb

#to_timeTime Also known as: time

Tries to make a Time object from current unit. Assumes the current unit hold the duration in seconds from the epoch.

Returns:



1394
1395
1396
# File 'lib/ruby_units/unit.rb', line 1394

def to_time
  Time.at(self)
end