lib/spoom/file_tree.rb in spoom-1.2.4 vs lib/spoom/file_tree.rb in spoom-1.3.0

- old
+ new

@@ -52,18 +52,10 @@ sig { returns(T::Array[String]) } def paths nodes.map(&:path) end - # Return a map of strictnesses for each node in the tree - sig { params(context: Context).returns(T::Hash[Node, T.nilable(String)]) } - def nodes_strictnesses(context) - v = CollectStrictnesses.new(context) - v.visit_tree(self) - v.strictnesses - end - # Return a map of typing scores for each node in the tree sig { params(context: Context).returns(T::Hash[Node, Float]) } def nodes_strictness_scores(context) v = CollectScores.new(context) v.visit_tree(self) @@ -77,17 +69,9 @@ end sig { params(out: T.any(IO, StringIO), colors: T::Boolean).void } def print(out: $stdout, colors: true) printer = Printer.new({}, out: out, colors: colors) - printer.visit_tree(self) - end - - sig { params(context: Context, out: T.any(IO, StringIO), colors: T::Boolean).void } - def print_with_strictnesses(context, out: $stdout, colors: true) - strictnesses = nodes_strictnesses(context) - - printer = Printer.new(strictnesses, out: out, colors: colors) printer.visit_tree(self) end # A node representing either a file or a directory inside a FileTree class Node < T::Struct