Class: Flows::Plugin::Profiler::Report::Tree::Node Private
- Inherits:
-
Object
- Object
- Flows::Plugin::Profiler::Report::Tree::Node
- Defined in:
- lib/flows/plugin/profiler/report/tree/node.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Attribute Summary collapse
- #executions ⇒ Object readonly private
- #subject ⇒ Object readonly private
Instance Method Summary collapse
- #[](subject) ⇒ Object private
- #children ⇒ Object private
-
#initialize(subject:) ⇒ Node
constructor
private
A new instance of Node.
- #register_execution(microseconds) ⇒ Object private
Constructor Details
#initialize(subject:) ⇒ Node
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Node.
10 11 12 13 14 15 16 |
# File 'lib/flows/plugin/profiler/report/tree/node.rb', line 10 def initialize(subject:) @subject = subject @children = {} @cache = {} @executions = [] end |
Instance Attribute Details
#executions ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
8 9 10 |
# File 'lib/flows/plugin/profiler/report/tree/node.rb', line 8 def executions @executions end |
#subject ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
8 9 10 |
# File 'lib/flows/plugin/profiler/report/tree/node.rb', line 8 def subject @subject end |
Instance Method Details
#[](subject) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
18 19 20 |
# File 'lib/flows/plugin/profiler/report/tree/node.rb', line 18 def [](subject) @children[subject] ||= Node.new(subject: subject) end |
#children ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
22 23 24 |
# File 'lib/flows/plugin/profiler/report/tree/node.rb', line 22 def children @children.values end |
#register_execution(microseconds) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
26 27 28 |
# File 'lib/flows/plugin/profiler/report/tree/node.rb', line 26 def register_execution(microseconds) @executions << microseconds end |