lib/spoom/file_tree.rb in spoom-1.0.7 vs lib/spoom/file_tree.rb in spoom-1.0.8
- old
+ new
@@ -78,10 +78,10 @@
printer.print_tree
end
private
- sig { params(node: FileTree::Node, collected_nodes: T::Array[Node]).returns(T::Array[String]) }
+ sig { params(node: FileTree::Node, collected_nodes: T::Array[Node]).returns(T::Array[Node]) }
def collect_nodes(node, collected_nodes = [])
collected_nodes << node
node.children.values.each { |child| collect_nodes(child, collected_nodes) }
collected_nodes
end