Methods

Duration::Time

Time#duration has been added to convert the UNIX timestamp into a Duration. See Time#duration for an example.

Public Instance Methods

duration() click to toggle source

Create a Duration object from the UNIX timestamp.

Example

  Time.now.duration
  => #<Duration: 1898 weeks, 6 days, 1 hour, 12 minutes and 1 second>
     # File lib/more/facets/duration.rb, line 272
272:     def duration
273:       Duration[to_i]
274:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.