class Bundler::Dependencies::CLI::Find

Private Instance Methods

banner() click to toggle source
dependents() click to toggle source
# File lib/bundler/dependencies/cli/find.rb, line 19
def dependents
  Bundler::Dependencies::Visitors::Paths.new.walk(gems, gem).each_with_object({}) do |path, acc|
    acc[path.first] ||= []
    acc[path.first] << path.join(' → ')
  end
end
paths() click to toggle source
# File lib/bundler/dependencies/cli/find.rb, line 26
def paths
  dependents.each do |gem, paths|
    puts
    say(gem, %i(bold))
    paths.each { |p| say "  * #{p}" }
  end
end
to_s() click to toggle source
# File lib/bundler/dependencies/cli/find.rb, line 9
def to_s
  if dependents.empty?
    error("No gems in the bundle depend on #{gem}.")
    exit(1)
  end

  banner
  paths unless options.quiet
end