Sha256: 8182572f54d06534e2ca7a158c38607483dba3d190173bcea879132621da8989
Contents?: true
Size: 608 Bytes
Versions: 9
Compression:
Stored size: 608 Bytes
Contents
# frozen_string_literal: true module ActionTracker module Workers class UndefinedWorkerError < StandardError; end class Factory attr_reader :form def initialize(form) @form = form end def instance raise UndefinedWorkerError, tracking_method unless worker_klass worker_klass.new(form) end private def worker_klass @worker_klass ||= "ActionTracker::Workers::#{tracking_method.classify}".safe_constantize end def tracking_method ActionTracker.config.tracking_method.to_s end end end end
Version data entries
9 entries across 9 versions & 1 rubygems