Class: Sqreen::Event
- Inherits:
-
Object
show all
- Defined in:
- lib/sqreen/event.rb
Overview
Master interface for point in time events (e.g. Attack, RemoteException)
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
#initialize(payload) ⇒ Event
Returns a new instance of Event.
17
18
19
20
|
# File 'lib/sqreen/event.rb', line 17
def initialize(payload)
@payload = payload
@time = Time.now.utc
end
|
Instance Attribute Details
#payload ⇒ Hash
12
13
14
|
# File 'lib/sqreen/event.rb', line 12
def payload
@payload
end
|
#time ⇒ Time
15
16
17
|
# File 'lib/sqreen/event.rb', line 15
def time
@time
end
|
Instance Method Details
#to_s ⇒ Object
22
23
24
|
# File 'lib/sqreen/event.rb', line 22
def to_s
"<#{self.class.name}: #{payload.to_hash}>"
end
|