Class: TraceViz::TraceData::RootNode
- Defined in:
- lib/trace_viz/trace_data/root_node.rb
Instance Attribute Summary
Attributes inherited from Node
Attributes included from TraceViz::Traits::TimeTrackable
Attributes included from TraceViz::Traits::DepthTrackable
Instance Method Summary collapse
-
#initialize ⇒ RootNode
constructor
A new instance of RootNode.
- #parent=(_parent) ⇒ Object
- #root? ⇒ Boolean
Methods inherited from Node
#add_child, #add_children, #to_h
Methods inherited from Base
#action, #event, #key, #klass, #line_number, #path, #to_h
Methods included from TraceViz::Traits::TimeTrackable
Methods included from TraceViz::Traits::DepthTrackable
Methods included from Helpers::ConfigHelper
#config, #fetch_general_config
Constructor Details
#initialize ⇒ RootNode
Returns a new instance of RootNode.
8 9 10 11 12 13 |
# File 'lib/trace_viz/trace_data/root_node.rb', line 8 def initialize super() # Explicitly ensure no parent for root @parent = nil end |
Instance Method Details
#parent=(_parent) ⇒ Object
19 20 21 |
# File 'lib/trace_viz/trace_data/root_node.rb', line 19 def parent=(_parent) raise NoMethodError, "RootNode cannot have a parent" end |
#root? ⇒ Boolean
15 16 17 |
# File 'lib/trace_viz/trace_data/root_node.rb', line 15 def root? true end |