diff options
| author | Jack Nagel | 2014-03-28 20:42:55 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-03-28 20:42:55 -0500 |
| commit | c27eed10bd32f0005f3c52db68713892b0cfa974 (patch) | |
| tree | a17dff461e37b45e5f7b5850466b1ab9434e069e /Library | |
| parent | a487909e9a720135940c4fc63c94a9f7af93a2f5 (diff) | |
| download | brew-c27eed10bd32f0005f3c52db68713892b0cfa974.tar.bz2 | |
Simplify collecting options
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/formula.rb | 10 |
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| |
