aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/tab.rb
diff options
context:
space:
mode:
authorJack Nagel2012-08-13 23:47:05 -0500
committerJack Nagel2012-08-20 14:16:08 -0500
commit3f9e88ae69b1ce7c854008b8cbebc38df11b8701 (patch)
tree644fc153d16ce2ee82bf160d4df0f32e9fa148a8 /Library/Homebrew/tab.rb
parent9b1bb5821447f75c7a33534a466df9a81535d0bc (diff)
downloadbrew-3f9e88ae69b1ce7c854008b8cbebc38df11b8701.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.rb4
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