I’m dealing with Ruby on Rails application.
Just to be educated, I would like to know if it is possible to generate an array of formatted strings; in this particular situation – hours and minutes.
I want to get following array: [“09:00”, “10:00”, “11:00”, “12:00”] from something like (9..12).to_a and something else ? What is the simpliest and cleanest way for this ?
Sorry if the question is stupid.
Thanks in advance
Something like this using rjust for left padding.