Robert Klemme wrote in post #1067316:

> %w{name biography country}.each do |field|
>   printf "%-20s: %s\n", field, actor_data[field] || "#{field} not
> available"
> end
>
> or just
>
> %w{name biography country}.each do |field|
>   printf "%-20s: %s\n", field, actor_data[field] || 'not available'
> end
>
> Btw wutang, IRB is a great too to try these things out.

I like your approach Robert, it would work particularly well for my use
case. Thanks for the reminder about IRB too, I was wasting time editing,
running and outputting to console. I'll get the hang of this wonderful
language eventually!

-- 
Posted via http://www.ruby-forum.com/.