2014-09-12 10:59 GMT+02:00  <ron.lelay / gmail.com>:
> Thanks for your answer. I'll try this.

> > {19 => '2A', 20 => '2B'}[index] || "%02d" % (index < 19 ? index + 1 :
> > (index > 94 ? '970' : index))

You can also use case:

def mark_as(index)
    case index
    when 0..18
        "%02d" % (index + 1)
    when 19
        '2A'
    when 20
        '2B'
    when 21..94
        "%02d" % index
    else
        '970'
    end
end


Jesus.