aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/formula_support.rb
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/formula_support.rb')
-rw-r--r--Library/Homebrew/formula_support.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/Library/Homebrew/formula_support.rb b/Library/Homebrew/formula_support.rb
index f72358d4d..9f30afbf7 100644
--- a/Library/Homebrew/formula_support.rb
+++ b/Library/Homebrew/formula_support.rb
@@ -185,6 +185,7 @@ end
# This class holds the build-time options defined for a Formula,
# and provides named access to those options during install.
class BuildOptions
+ attr_writer :args
include Enumerable
def initialize args
@@ -253,4 +254,12 @@ class BuildOptions
def build_32_bit?
@args.include? '--32-bit'
end
+
+ def used_options
+ as_flags & @args.options_only
+ end
+
+ def unused_options
+ as_flags - @args.options_only
+ end
end