Class: Vizsla::Event
- Inherits:
-
Object
show all
- Defined in:
- lib/vizsla/subscribers.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
#initialize(event) ⇒ Event
Returns a new instance of Event.
8
9
10
|
# File 'lib/vizsla/subscribers.rb', line 8
def initialize(event)
@event = event
end
|
Instance Attribute Details
#event ⇒ Object
Returns the value of attribute event.
6
7
8
|
# File 'lib/vizsla/subscribers.rb', line 6
def event
@event
end
|
Instance Method Details
#prettify_data ⇒ Object
20
21
22
23
24
25
26
27
|
# File 'lib/vizsla/subscribers.rb', line 20
def prettify_data
{
event_started: event[1],
event_ended: event[2],
event_duration: event[2] - event[1],
event_payload: prettify_payload
}
end
|
#recorder_type ⇒ Object
12
13
14
|
# File 'lib/vizsla/subscribers.rb', line 12
def recorder_type
event[0]
end
|
#valid? ⇒ Boolean
16
17
18
|
# File 'lib/vizsla/subscribers.rb', line 16
def valid?
true
end
|