From: Justin Bailey Date: 2006-05-04T06:06:20+09:00 Subject: Re: Immediate if method Just use the "ternary" if operator. In Ruby, all values except nil are considered "true" in conditions. So you could write: statusbar_text = condition ? "true text" : "false text" The "if" statement actually "returns" a value, so a more verbose way to write it would be: statusbar_text = if condition "true text" else "false text" end Hope that helps.