class Bundler::Dependencies::Visitors::ShellTree

Public Instance Methods

walk(graph, shell = nil) click to toggle source
# File lib/bundler/dependencies/visitors/shell_tree.rb, line 5
def walk(graph, shell = nil)
  Visitor.walk(graph) do |gem, depth|
    if depth > 0
      print '  ' * depth
      print '- '
    end

    say(shell, gem.name, (:bold if depth == 0))
  end

  nil
end

Private Instance Methods

say(shell, message, opts) click to toggle source
# File lib/bundler/dependencies/visitors/shell_tree.rb, line 20
def say(shell, message, opts)
  if shell
    shell.say(message, opts)
  else
    puts message
  end
end