aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2014-03-28 20:42:55 -0500
committerJack Nagel2014-03-28 20:42:55 -0500
commit5b37da199200785912a508240d470635fb6c1a6f (patch)
treee06c8a168c7a2814c0590ab8e54502741403fba8 /Library
parentd55a166938164ee5ed3b1d0facce5552cfb5e0d8 (diff)
downloadhomebrew-5b37da199200785912a508240d470635fb6c1a6f.tar.bz2
Simplify collecting options
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/formula.rb10
1 files changed, 3 insertions, 7 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb
index 3aca80feb..9d6f525ba 100644
--- a/Library/Homebrew/formula.rb
+++ b/Library/Homebrew/formula.rb
@@ -497,16 +497,12 @@ class Formula
"keg_only" => keg_only?,
"dependencies" => deps.map(&:name),
"conflicts_with" => conflicts.map(&:name),
- "options" => [],
"caveats" => caveats
}
- build.each do |opt|
- hsh["options"] << {
- "option" => "--"+opt.name,
- "description" => opt.description
- }
- end
+ hsh["options"] = build.map { |opt|
+ { "option" => opt.flag, "description" => opt.description }
+ }
if rack.directory?
rack.subdirs.each do |keg|