We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 672b9cf commit fc90479Copy full SHA for fc90479
lib/Terminal/Widgets/Volatile/DirTree.rakumod
@@ -13,6 +13,13 @@ role Node {
13
my $short-name = self.^name.subst('Terminal::Widgets::Volatile::', '');
14
$short-name ~ ':' ~ $!path.path
15
}
16
+
17
+ #| Find root node via parent chain, runtime is O(depth)
18
+ method root(::?CLASS:D:) {
19
+ my $root = self;
20
+ $root .= parent while $root.parent;
21
+ $root
22
+ }
23
24
25
class Dev does Node {
0 commit comments