class DataPipe2::Jobs

Hold all jobs

Attributes

byName[R]
hash[R]

Public Class Methods

new() click to toggle source
# File lib/jobs.rb, line 67
def initialize
  @hash = {}
  @by_name = {}
end

Public Instance Methods

call(path) click to toggle source
# File lib/jobs.rb, line 72
def call(path)
  if @hash[path].nil?
    j = Job.new(path)
    @hash[path] = j
    @by_name[j.name.downcase] = j
    j.run
  else
    @hash[path].call
  end
end