Class: RequireProfiler::Reporter::Node
- Inherits:
-
Struct
- Object
- Struct
- RequireProfiler::Reporter::Node
- Defined in:
- lib/require_profiler/reporter.rb
Instance Attribute Summary collapse
-
#children ⇒ Object
Returns the value of attribute children.
-
#focused ⇒ Object
Returns the value of attribute focused.
-
#parent ⇒ Object
Returns the value of attribute parent.
-
#path ⇒ Object
Returns the value of attribute path.
-
#time ⇒ Object
Returns the value of attribute time.
Instance Method Summary collapse
- #focused! ⇒ Object
-
#initialize ⇒ Node
constructor
A new instance of Node.
Constructor Details
#initialize ⇒ Node
Returns a new instance of Node.
9 10 11 12 13 |
# File 'lib/require_profiler/reporter.rb', line 9 def initialize(...) super self.children ||= [] self.focused = false end |
Instance Attribute Details
#children ⇒ Object
Returns the value of attribute children
8 9 10 |
# File 'lib/require_profiler/reporter.rb', line 8 def children @children end |
#focused ⇒ Object
Returns the value of attribute focused
8 9 10 |
# File 'lib/require_profiler/reporter.rb', line 8 def focused @focused end |
#parent ⇒ Object
Returns the value of attribute parent
8 9 10 |
# File 'lib/require_profiler/reporter.rb', line 8 def parent @parent end |
#path ⇒ Object
Returns the value of attribute path
8 9 10 |
# File 'lib/require_profiler/reporter.rb', line 8 def path @path end |
#time ⇒ Object
Returns the value of attribute time
8 9 10 |
# File 'lib/require_profiler/reporter.rb', line 8 def time @time end |
Instance Method Details
#focused! ⇒ Object
15 16 17 18 |
# File 'lib/require_profiler/reporter.rb', line 15 def focused! self.focused = true parent&.focused! end |