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
commitc27eed10bd32f0005f3c52db68713892b0cfa974 (patch)
treea17dff461e37b45e5f7b5850466b1ab9434e069e /Library
parenta487909e9a720135940c4fc63c94a9f7af93a2f5 (diff)
downloadbrew-c27eed10bd32f0005f3c52db68713892b0cfa974.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|