jjb / ruby-clock

A ruby job scheduler which runs jobs each in their own thread in a persistent process.
MIT License
78 stars 1 forks source link

Rufus::Scheduler::Job#identifier #2

Closed jjb closed 3 years ago

jjb commented 3 years ago

see also discussion in https://github.com/jmettraux/rufus-scheduler/issues/322

jmettraux commented 3 years ago
  name || handler.source.split("\n").reject{|l| l.empty? }.grep_v(/#.*/)[-2].strip
    # shaving some horizontal space...  
  name || handler.source.split("\n").reject(&:empty?).grep_v(/#.*/)[-2].strip