lib/picky/bundle.rb in picky-4.19.7 vs lib/picky/bundle.rb in picky-4.20.0

- old
+ new

@@ -161,9 +161,21 @@ # if none given. # def index_path type = nil ::File.join index_directory, "#{category.name}_#{name}#{ "_#{type}" if type }" end + + def to_tree_s indent = 0, &block + s = <<-TREE +#{' ' * indent}#{self.class.name.gsub('Picky::','')}(#{name}) +#{' ' * indent} Inverted(#{inverted.size})[#{backend_inverted}]#{block && block.call(inverted)} +#{' ' * indent} Weights (#{weights.size})[#{backend_weights}]#{block && block.call(weights)} +#{' ' * indent} Similari(#{similarity.size})[#{backend_similarity}]#{block && block.call(similarity)} +#{' ' * indent} Realtime(#{realtime.size})[#{backend_realtime}]#{block && block.call(realtime)} +#{' ' * indent} Configur(#{configuration.size})[#{backend_configuration}]#{block && block.call(configuration)} +TREE + s.chomp + end def to_s "#{self.class}(#{identifier})" end \ No newline at end of file