Sha256: 0c35aa76a00a7ab0f8767d17fa6fcbca20b0c5dde26d57708ce13eaf352dc75d

Contents?: true

Size: 257 Bytes

Versions: 17

Compression:

Stored size: 257 Bytes

Contents

class Fixnum
  SECONDS_IN_MINUTE = 60
  SECONDS_IN_HOUR =  60 * SECONDS_IN_MINUTE
  SECONDS_IN_DAY = 24 * SECONDS_IN_HOUR

  def days
    self * SECONDS_IN_DAY
  end

  def minutes
    self * SECONDS_IN_MINUTE
  end

  def ago
    Time.now - self
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
stackify-api-ruby-1.2.4 lib/core_ext/fixnum.rb
stackify-api-ruby-1.2.3 lib/core_ext/fixnum.rb
stackify-api-ruby-1.1.0 lib/core_ext/fixnum.rb
stackify-api-ruby-1.0.15 lib/core_ext/fixnum.rb
stackify-api-ruby-1.0.14 lib/core_ext/fixnum.rb
stackify-api-ruby-1.0.13 lib/core_ext/fixnum.rb
stackify-api-ruby-1.0.12 lib/core_ext/fixnum.rb
stackify-api-ruby-1.0.11 lib/core_ext/fixnum.rb
stackify-api-ruby-1.0.10 lib/core_ext/fixnum.rb
stackify-api-ruby-1.0.9 lib/core_ext/fixnum.rb
stackify-api-ruby-1.0.8 lib/core_ext/fixnum.rb
stackify-api-ruby-1.0.7 lib/core_ext/fixnum.rb
stackify-api-ruby-1.0.6 lib/core_ext/fixnum.rb
stackify-api-ruby-1.0.4 lib/core_ext/fixnum.rb
stackify-api-ruby-1.0.3 lib/core_ext/fixnum.rb
stackify-api-ruby-1.0.2 lib/core_ext/fixnum.rb
stackify-api-ruby-1.0.1 lib/core_ext/fixnum.rb