Update documentation for Dependency.expand
This commit is contained in:
parent
1408610b81
commit
c5f73a01be
@ -54,11 +54,11 @@ class Dependency
|
|||||||
tags << 'universal' if to_formula.build.has_option? 'universal'
|
tags << 'universal' if to_formula.build.has_option? 'universal'
|
||||||
end
|
end
|
||||||
|
|
||||||
# Expand the dependencies of f recursively, optionally yielding
|
# Expand the dependencies of dependent recursively, optionally yielding
|
||||||
# [f, dep] to allow callers to apply arbitrary filters to the list.
|
# [dependent, dep] pairs to allow callers to apply arbitrary filters to
|
||||||
# The default filter, which is used when a block is not supplied,
|
# the list.
|
||||||
# omits optionals and recommendeds based on what the dependent has
|
# The default filter, which is applied when a block is not given, omits
|
||||||
# asked for.
|
# optionals and recommendeds based on what the dependent has asked for.
|
||||||
def self.expand(dependent, &block)
|
def self.expand(dependent, &block)
|
||||||
dependent.deps.map do |dep|
|
dependent.deps.map do |dep|
|
||||||
prune = catch(:prune) do
|
prune = catch(:prune) do
|
||||||
@ -75,7 +75,7 @@ class Dependency
|
|||||||
end.flatten.compact.uniq
|
end.flatten.compact.uniq
|
||||||
end
|
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
|
def self.prune
|
||||||
throw(:prune, true)
|
throw(:prune, true)
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user