From: Kyle Schmitt Date: 2007-08-03T08:09:43+09:00 Subject: cleaner way? I'll first admit this is a lot cleaner and more succinct than my first pass of it... but well Is there a way to make this case and send block clearer and cleaner? Thanks, Kyle def getProperties(type=:textField) logWarning("Please use a symbol, not a string for :#{type.to_s}") unless type.is_a?Symbol converter = case type.to_sym when :textField,:text_field then "clone" when :text,:t,:value then "value" when :html then "html" else logError("I'm not familiar with :#{type.to_s}, please try another type.") end {:name=>@ie.text_field(:id,/EnvironmentTextEdit/).send(converter), :start=>@ie.text_field(:id,/StartYearEdit/).send(converter), :years=>@ie.text_field(:id,/NumberOfYearsEdit/).send(converter)} end