From f3d3bc436829b5e9212e052cec50cded80cea2df Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Wed, 23 Jan 2013 00:26:20 -0600 Subject: Move option comparison into BuildOptions --- Library/Homebrew/formula_support.rb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'Library/Homebrew/formula_support.rb') 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 -- cgit v1.2.3