jackc / tod

Time of day and shift types for Ruby

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Implement to_proc

mtejedorwolox opened this issue · comments

Currently and array of strings can't be mapped into ToD with:
string_times.map(&Tod::TimeOfDay.new)

(strings, integers, etc, etc, etc)

Is this what you are looking for?

%w[08:00:00 12:00:00].map(&Tod.method(:TimeOfDay))