Sha256: 9dbe2c79fce14c9295e028c57d0ecbda773bb6c2b5ba14b869ab6ecb3deacb0d

Contents?: true

Size: 185 Bytes

Versions: 16

Compression:

Stored size: 185 Bytes

Contents

require 'date'

class Randgen
  DATE_TIME_EPOCH = ::DateTime.new(2015, 1, 1, 0, 0, 0)

  def self.date
    DATE_TIME_EPOCH - rand(800)
  end

  def self.time
    date.to_time
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
attributor-7.1 lib/attributor/extensions/randexp.rb
attributor-7.0 lib/attributor/extensions/randexp.rb
attributor-6.5 lib/attributor/extensions/randexp.rb
attributor-6.4 lib/attributor/extensions/randexp.rb
attributor-6.3 lib/attributor/extensions/randexp.rb
attributor-6.2 lib/attributor/extensions/randexp.rb
attributor-6.1 lib/attributor/extensions/randexp.rb
attributor-6.0 lib/attributor/extensions/randexp.rb
attributor-5.7 lib/attributor/extensions/randexp.rb
attributor-5.6 lib/attributor/extensions/randexp.rb
attributor-5.5 lib/attributor/extensions/randexp.rb
attributor-5.4 lib/attributor/extensions/randexp.rb
attributor-5.3 lib/attributor/extensions/randexp.rb
attributor-5.2.1 lib/attributor/extensions/randexp.rb
attributor-5.2.0 lib/attributor/extensions/randexp.rb
attributor-5.1.0 lib/attributor/extensions/randexp.rb