diff options
| author | Jack Nagel | 2013-01-23 00:26:23 -0600 |
|---|---|---|
| committer | Jack Nagel | 2013-01-26 11:37:01 -0600 |
| commit | cbf0fe654954a85ef5ecd03c332602674d7cde4f (patch) | |
| tree | 4fe3d04bf46584ccacde98825043537d2dfedfff /Library | |
| parent | 4062559acb96f9b8c7e33ef99deb548ce73d6d6e (diff) | |
| download | brew-cbf0fe654954a85ef5ecd03c332602674d7cde4f.tar.bz2 | |
BuildOptions: simplify setting description
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/formula_support.rb | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/Library/Homebrew/formula_support.rb b/Library/Homebrew/formula_support.rb index d4e6a1476..b049c6dfb 100644 --- a/Library/Homebrew/formula_support.rb +++ b/Library/Homebrew/formula_support.rb @@ -206,16 +206,10 @@ class BuildOptions end def add name, description=nil - if description.nil? - case name - when :universal, "universal" - description = "Build a universal binary" - when "32-bit" - description = "Build 32-bit only" - else - description = "" - end - end + description ||= case name.to_s + when "universal" then "Build a universal binary" + when "32-bit" then "Build 32-bit only" + end.to_s @options << Option.new(name, description) end |
