Sha256: b74285c2f0c1248962ce90d077e49907b53c872c10e97a69fbebbd607485c4c7

Contents?: true

Size: 419 Bytes

Versions: 6

Compression:

Stored size: 419 Bytes

Contents

class Fixnum
  def minutes
    self * 60
  end

  def hours
    self.minutes * 60
  end

  def days
    self.hours * 24
  end

  def seconds
    self
  end

  def weeks
    self.days * 7
  end

  def years
    self.days * 365
  end

  alias_method :day, :days
  alias_method :week, :weeks
  alias_method :hour, :hours
  alias_method :second, :seconds
  alias_method :minute, :minutes
  alias_method :year, :years
end


Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
rhcf-timeseries-2.0.1pre lib/rhcf/extensions/fixnum.rb
rhcf-timeseries-2.0.0pre lib/rhcf/extensions/fixnum.rb
rhcf-timeseries-1.0.3 lib/rhcf/extensions/fixnum.rb
rhcf-timeseries-1.0.2 lib/rhcf/extensions/fixnum.rb
rhcf-timeseries-1.0.1 lib/rhcf/extensions/fixnum.rb
rhcf-timeseries-1.0.0 lib/rhcf/extensions/fixnum.rb