From cbf0fe654954a85ef5ecd03c332602674d7cde4f Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Wed, 23 Jan 2013 00:26:23 -0600 Subject: [PATCH] BuildOptions: simplify setting description --- Library/Homebrew/formula_support.rb | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/Library/Homebrew/formula_support.rb b/Library/Homebrew/formula_support.rb index d4e6a1476b..b049c6dfba 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