Class: Interactify::Async::JobMaker

Inherits:
Object
  • Object
show all
Defined in:
lib/interactify/async/job_maker.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(container_klass:, opts:, klass_suffix:, method_name: :call!) ⇒ JobMaker

Returns a new instance of JobMaker.



11
12
13
14
15
16
# File 'lib/interactify/async/job_maker.rb', line 11

def initialize(container_klass:, opts:, klass_suffix:, method_name: :call!)
  @container_klass = container_klass
  @opts = opts
  @method_name = method_name
  @klass_suffix = klass_suffix
end

Instance Attribute Details

#container_klassObject (readonly)

Returns the value of attribute container_klass.



9
10
11
# File 'lib/interactify/async/job_maker.rb', line 9

def container_klass
  @container_klass
end

#klass_suffixObject (readonly)

Returns the value of attribute klass_suffix.



9
10
11
# File 'lib/interactify/async/job_maker.rb', line 9

def klass_suffix
  @klass_suffix
end

#method_nameObject (readonly)

Returns the value of attribute method_name.



9
10
11
# File 'lib/interactify/async/job_maker.rb', line 9

def method_name
  @method_name
end

#optsObject (readonly)

Returns the value of attribute opts.



9
10
11
# File 'lib/interactify/async/job_maker.rb', line 9

def opts
  @opts
end

Instance Method Details

#async_job_klassObject



53
54
55
# File 'lib/interactify/async/job_maker.rb', line 53

def async_job_klass
  JobKlass.new(container_klass:, klass_suffix:).async_job_klass
end