Class: TraceViz::TraceData::Base
Direct Known Subclasses
Node
Instance Attribute Summary
#timestamp
#depth
Instance Method Summary
collapse
#record_timestamp
#assign_depth
#config, #fetch_general_config
Constructor Details
#initialize ⇒ Base
Returns a new instance of Base.
13
14
15
16
|
# File 'lib/trace_viz/trace_data/base.rb', line 13
def initialize
assign_depth(0)
record_timestamp
end
|
Instance Method Details
#action ⇒ Object
33
34
35
|
# File 'lib/trace_viz/trace_data/base.rb', line 33
def action
raise NotImplementedError
end
|
#event ⇒ Object
25
26
27
|
# File 'lib/trace_viz/trace_data/base.rb', line 25
def event
raise NotImplementedError
end
|
#key ⇒ Object
Represents trace data type code
21
22
23
|
# File 'lib/trace_viz/trace_data/base.rb', line 21
def key
:base
end
|
#klass ⇒ Object
29
30
31
|
# File 'lib/trace_viz/trace_data/base.rb', line 29
def klass
raise NotImplementedError
end
|
#line_number ⇒ Object
41
42
43
|
# File 'lib/trace_viz/trace_data/base.rb', line 41
def line_number
raise NotImplementedError
end
|
#path ⇒ Object
37
38
39
|
# File 'lib/trace_viz/trace_data/base.rb', line 37
def path
raise NotImplementedError
end
|
#to_h ⇒ Object
45
46
47
48
49
50
51
52
53
|
# File 'lib/trace_viz/trace_data/base.rb', line 45
def to_h
{
event: event,
klass: klass,
action: action,
path: path,
line_number: line_number,
}
end
|