diff options
| author | Jack Nagel | 2012-08-13 23:47:05 -0500 |
|---|---|---|
| committer | Jack Nagel | 2012-08-20 14:16:08 -0500 |
| commit | 803535556c3114c0c1f46f7b6dbc0d5b8c370dc2 (patch) | |
| tree | 7a9d9ce7c0fff9852bb6e2289579e0131ec9c43f /Library/Homebrew/tab.rb | |
| parent | fd3c0e19dc4302cba7ba8634195deb1fdb7ec39c (diff) | |
| download | homebrew-803535556c3114c0c1f46f7b6dbc0d5b8c370dc2.tar.bz2 | |
Simplify build options API
Simplify access to the different forms of a formula's build options by
making options into real objects rather than strings, and expose both
the 'name' and 'flag' form.
Diffstat (limited to 'Library/Homebrew/tab.rb')
| -rw-r--r-- | Library/Homebrew/tab.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Library/Homebrew/tab.rb b/Library/Homebrew/tab.rb index 0d93c46ae..32fb5d365 100644 --- a/Library/Homebrew/tab.rb +++ b/Library/Homebrew/tab.rb @@ -13,7 +13,7 @@ class Tab < OpenStruct arg_options = args.options_only # Pick off the option flags from the formula's `options` array by # discarding the descriptions. - formula_options = f.build.map { |opt, _| "--#{opt}" } + formula_options = f.build.as_flags Tab.new :used_options => formula_options & arg_options, :unused_options => formula_options - arg_options, @@ -67,7 +67,7 @@ class Tab < OpenStruct def self.dummy_tab f Tab.new :used_options => [], - :unused_options => f.build.map { |opt, _| "--#{opt}" }, + :unused_options => f.build.as_flags, :built_bottle => false, :tapped_from => "" end |
