aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd/options.rb
diff options
context:
space:
mode:
authorJack Nagel2012-08-13 23:47:05 -0500
committerJack Nagel2012-08-20 14:16:08 -0500
commit803535556c3114c0c1f46f7b6dbc0d5b8c370dc2 (patch)
tree7a9d9ce7c0fff9852bb6e2289579e0131ec9c43f /Library/Homebrew/cmd/options.rb
parentfd3c0e19dc4302cba7ba8634195deb1fdb7ec39c (diff)
downloadhomebrew-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/cmd/options.rb')
-rw-r--r--Library/Homebrew/cmd/options.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/Library/Homebrew/cmd/options.rb b/Library/Homebrew/cmd/options.rb
index 482f982cc..2f64f5b39 100644
--- a/Library/Homebrew/cmd/options.rb
+++ b/Library/Homebrew/cmd/options.rb
@@ -21,7 +21,7 @@ module Homebrew extend self
ff.each do |f|
next if f.build.empty?
if ARGV.include? '--compact'
- puts f.build.collect {|k,v| "--"+k} * " "
+ puts f.build.as_flags * " "
else
puts f.name if ff.length > 1
dump_options_for_formula f
@@ -31,9 +31,9 @@ module Homebrew extend self
end
def dump_options_for_formula f
- f.build.each do |k,v|
- puts "--"+k
- puts "\t"+v
+ f.build.each do |opt|
+ puts opt.flag
+ puts "\t"+opt.description
end
end
end