Class: TraceViz::TraceData::HierarchyLinker
- Inherits:
-
Object
- Object
- TraceViz::TraceData::HierarchyLinker
- Defined in:
- lib/trace_viz/collectors/hierarchy_linker.rb
Instance Attribute Summary collapse
-
#root ⇒ Object
readonly
Returns the value of attribute root.
Instance Method Summary collapse
-
#initialize ⇒ HierarchyLinker
constructor
A new instance of HierarchyLinker.
- #link(trace_data) ⇒ Object
Constructor Details
#initialize ⇒ HierarchyLinker
Returns a new instance of HierarchyLinker.
10 11 12 |
# File 'lib/trace_viz/collectors/hierarchy_linker.rb', line 10 def initialize @root = RootNode.new end |
Instance Attribute Details
#root ⇒ Object (readonly)
Returns the value of attribute root.
8 9 10 |
# File 'lib/trace_viz/collectors/hierarchy_linker.rb', line 8 def root @root end |
Instance Method Details
#link(trace_data) ⇒ Object
14 15 16 17 18 |
# File 'lib/trace_viz/collectors/hierarchy_linker.rb', line 14 def link(trace_data) return unless valid?(trace_data) root.add_child(trace_data) end |