Class: Textus::Background::Job::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/textus/background/job/base.rb

Direct Known Subclasses

Materialize, Refresh, Sweep

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.inherited(subclass) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
# File 'lib/textus/background/job/base.rb', line 7

def self.inherited(subclass)
  super
  return unless subclass.name

  TracePoint.new(:end) do |tp|
    if tp.self == subclass
      Textus::Background::Job.register(subclass)
      tp.disable
    end
  end.enable
end

Instance Method Details

#argsObject



23
# File 'lib/textus/background/job/base.rb', line 23

def args = {}

#callObject

Raises:

  • (NotImplementedError)


19
20
21
# File 'lib/textus/background/job/base.rb', line 19

def call(**)
  raise NotImplementedError.new("#{self.class}#call")
end