Sha256: 1916097c80707a8c175fad0e8912bb86b1a9812eaaa9973c19026f9ac0d877a8

Contents?: true

Size: 510 Bytes

Versions: 73

Compression:

Stored size: 510 Bytes

Contents

class Numeric
  def seconds
    self
  end
  
  alias :second :seconds
  
  def minutes
    self * 60
  end
  
  alias :minute :minutes
  
  def hours
    self * 3600
  end
  
  alias :hour :hours
  
  def days
    self * 86400
  end
  
  alias :day :days
  
  def kilobytes
    self
  end
  
  alias :kilobyte :kilobytes
  
  def megabytes
    self * 1024
  end
  
  alias :megabyte :megabytes
  
  def gigabytes
    self * (1024 ** 2)
  end
  
  alias :gigabyte :gigabytes
  
  def percent
    self
  end
end

Version data entries

73 entries across 73 versions & 21 rubygems

Version Path
god-0.5.0 lib/god/sugar.rb
god-0.4.0 lib/god/sugar.rb
god-0.7.10 lib/god/sugar.rb
god-0.6.0 lib/god/sugar.rb
god-0.4.3 lib/god/sugar.rb
god-0.4.1 lib/god/sugar.rb
god-0.7.12 lib/god/sugar.rb
god-0.7.13 lib/god/sugar.rb
god-0.7.5 lib/god/sugar.rb
god-0.7.3 lib/god/sugar.rb
god-0.7.6 lib/god/sugar.rb
god-0.7.7 lib/god/sugar.rb
god-0.7.8 lib/god/sugar.rb