Sha256: 2d3aef7597d784ffed07b8bf3dc5d8cfac4c3a940764aad598e89240052c3cfc
Contents?: true
Size: 397 Bytes
Versions: 25
Compression:
Stored size: 397 Bytes
Contents
module SocialStream module Population class Timestamps SCOPE = 1.month attr_reader :created, :updated def initialize created = rand(SCOPE) update = [ true, false ].sample updated = update ? rand(created) : created @created = Time.at(Time.now.to_i - created) @updated = Time.at(Time.now.to_i - updated) end end end end
Version data entries
25 entries across 25 versions & 2 rubygems