aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/formula.rb
diff options
context:
space:
mode:
authorJack Nagel2012-08-07 14:22:20 -0500
committerJack Nagel2012-08-07 14:24:54 -0500
commit4f809d0311ab6ca8da897d2a9830b9ecbf262d60 (patch)
tree2af41b3b084a29cfb954763e22493239940331c3 /Library/Homebrew/formula.rb
parent82d3890495a13d488dc2a024f69979d914b6bf6d (diff)
downloadbrew-4f809d0311ab6ca8da897d2a9830b9ecbf262d60.tar.bz2
Simplify printing conflicts in `brew info`
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library/Homebrew/formula.rb')
-rw-r--r--Library/Homebrew/formula.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb
index fb0855a17..d78ded9b0 100644
--- a/Library/Homebrew/formula.rb
+++ b/Library/Homebrew/formula.rb
@@ -425,6 +425,10 @@ class Formula
def deps; self.class.dependencies.deps; end
def requirements; self.class.dependencies.requirements; end
+ def conflicts
+ requirements.select { |r| r.is_a? ConflictRequirement }
+ end
+
# deps are in an installable order
# which means if a depends on b then b will be ordered before a in this list
def recursive_deps