Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

Commit

Permalink
Update documentation for Dependency.expand
Browse files Browse the repository at this point in the history
  • Loading branch information
jacknagel committed Jan 31, 2013
1 parent 7522e48 commit 44544fe
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Library/Homebrew/dependency.rb
Expand Up @@ -54,11 +54,11 @@ def universal!
tags << 'universal' if to_formula.build.has_option? 'universal'
end

# Expand the dependencies of f recursively, optionally yielding
# [f, dep] to allow callers to apply arbitrary filters to the list.
# The default filter, which is used when a block is not supplied,
# omits optionals and recommendeds based on what the dependent has
# asked for.
# Expand the dependencies of dependent recursively, optionally yielding
# [dependent, dep] pairs to allow callers to apply arbitrary filters to
# the list.
# The default filter, which is applied when a block is not given, omits
# optionals and recommendeds based on what the dependent has asked for.
def self.expand(dependent, &block)
dependent.deps.map do |dep|
prune = catch(:prune) do
Expand All @@ -75,7 +75,7 @@ def self.expand(dependent, &block)
end.flatten.compact.uniq
end

# Used to prune dependencies when calling expand_dependencies with a block.
# Used to prune dependencies when calling expand with a block.
def self.prune
throw(:prune, true)
end
Expand Down

0 comments on commit 44544fe

Please sign in to comment.