Sha256: 9a7f83fb579d327490715510bea2416645e2c94b566771a44980103ee47ace40

Contents?: true

Size: 324 Bytes

Versions: 2

Compression:

Stored size: 324 Bytes

Contents

module Buschtelefon
  class Gossip
    attr_reader :created_at, :message

    def initialize(message)
      @created_at = unix_timestamp_ms
      @message = message
    end

    def ==(other)
      @message == other.message
    end

    private

    def unix_timestamp_ms
      (Time.now.to_f * 1000).to_i
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
buschtelefon-0.2.0 lib/buschtelefon/gossip.rb
buschtelefon-0.1.0 lib/buschtelefon/gossip.rb