diff options
| author | Jack Nagel | 2013-01-23 00:26:20 -0600 |
|---|---|---|
| committer | Jack Nagel | 2013-01-26 11:37:00 -0600 |
| commit | f3d3bc436829b5e9212e052cec50cded80cea2df (patch) | |
| tree | 0d2ce31c56709e64a5ec66f03b8f061df34bbca2 /Library/Homebrew/formula_support.rb | |
| parent | d8a83073ff69ea70f375238d810f833624823ea8 (diff) | |
| download | brew-f3d3bc436829b5e9212e052cec50cded80cea2df.tar.bz2 | |
Move option comparison into BuildOptions
Diffstat (limited to 'Library/Homebrew/formula_support.rb')
| -rw-r--r-- | Library/Homebrew/formula_support.rb | 9 |
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 |
