telltime.rb: use ternary operator