Sha256: 83a5f84de04f8f61e49937d0ed8a22041ca8f9a2b1b2d2eeb547ad54255e9843
Contents?: true
Size: 835 Bytes
Versions: 4
Compression:
Stored size: 835 Bytes
Contents
module GitCompound module Worker # Worker that prints dependency tree # class PrettyPrint < Worker def visit_component(component) pretty_print(component, " `#{component.name}` component, #{component.version}") end def visit_manifest(manifest) details = [] details << "Component: #{manifest.name}" unless manifest.name.empty? details << "Maintainer: #{manifest.maintainer.join(', ')}" unless manifest.maintainer.empty? details << 'Dependencies:' unless manifest.components.empty? pretty_print(manifest, *details) end private def pretty_print(element, *messages) messages.each do |message| Logger.inline ' ' * element.ancestors.count Logger.info message end end end end end
Version data entries
4 entries across 4 versions & 1 rubygems