Sha256: de8bdc25bb9937d647354e17e4b1446724bb813a4addc3bbc1c7b9621182be90

Contents?: true

Size: 572 Bytes

Versions: 19

Compression:

Stored size: 572 Bytes

Contents

# typed: true

# Copyright (c) 2015 Sqreen. All Rights Reserved.
# Please refer to our terms for more information: https://www.sqreen.com/terms.html

# TODO: see sqreen/events

module Sqreen
  # Master interface for point in time events (e.g. Attack, RemoteException)
  class Event
    # @return [Hash]
    attr_reader :payload

    # @return [Time]
    attr_accessor :time # writer used only in tests

    def initialize(payload)
      @payload = payload
      @time = Time.now.utc
    end

    def to_s
      "<#{self.class.name}: #{payload.to_hash}>"
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
sqreen-1.22.0-java lib/sqreen/event.rb
sqreen-1.22.0 lib/sqreen/event.rb
sqreen-1.21.1-java lib/sqreen/event.rb
sqreen-1.21.1 lib/sqreen/event.rb
sqreen-1.21.0-java lib/sqreen/event.rb
sqreen-1.21.0 lib/sqreen/event.rb
sqreen-1.20.4-java lib/sqreen/event.rb
sqreen-1.20.4 lib/sqreen/event.rb
sqreen-1.21.0.beta3-java lib/sqreen/event.rb
sqreen-1.21.0.beta3 lib/sqreen/event.rb
sqreen-1.20.4.beta1 lib/sqreen/event.rb
sqreen-1.20.3 lib/sqreen/event.rb
sqreen-1.20.2 lib/sqreen/event.rb
sqreen-1.21.0.beta2 lib/sqreen/event.rb
sqreen-1.21.0.beta1 lib/sqreen/event.rb
sqreen-1.20.1-java lib/sqreen/event.rb
sqreen-1.20.1 lib/sqreen/event.rb
sqreen-1.20.0-java lib/sqreen/event.rb
sqreen-1.20.0 lib/sqreen/event.rb