Class: SidekiqAdminEnquerer::WebApp::JobMethodWrapper Private
- Inherits:
-
Object
- Object
- SidekiqAdminEnquerer::WebApp::JobMethodWrapper
- Defined in:
- lib/sidekiq_admin_enquerer/web_app/job_method_wrapper.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Constant Summary collapse
- JOB_INVOCATION_METHODS =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
%i[ perform perform_in perform_async perform_at ].freeze
Instance Attribute Summary collapse
- #job ⇒ Class<ActiveJob::Base>, Class<Sidekiq::Worker> readonly private
- #name ⇒ Symbol readonly private
- #params ⇒ Array<SidekiqAdminEnquerer::WebApp::JobParamWrapper> readonly private
Class Method Summary collapse
Instance Method Summary collapse
- #initialize(job, name, params) ⇒ void constructor private
Constructor Details
#initialize(job, name, params) ⇒ void
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
60 61 62 63 64 |
# File 'lib/sidekiq_admin_enquerer/web_app/job_method_wrapper.rb', line 60 def initialize(job, name, params) @job = job @name = name @params = params end |
Instance Attribute Details
#job ⇒ Class<ActiveJob::Base>, Class<Sidekiq::Worker> (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
39 40 41 |
# File 'lib/sidekiq_admin_enquerer/web_app/job_method_wrapper.rb', line 39 def job @job end |
#name ⇒ Symbol (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
45 46 47 |
# File 'lib/sidekiq_admin_enquerer/web_app/job_method_wrapper.rb', line 45 def name @name end |
#params ⇒ Array<SidekiqAdminEnquerer::WebApp::JobParamWrapper> (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
51 52 53 |
# File 'lib/sidekiq_admin_enquerer/web_app/job_method_wrapper.rb', line 51 def params @params end |
Class Method Details
.extract_methods_from(job) ⇒ Array<SidekiqAdminEnquerer::WebApp::JobMethodWrapper>
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
23 24 25 26 27 28 29 30 31 32 |
# File 'lib/sidekiq_admin_enquerer/web_app/job_method_wrapper.rb', line 23 def extract_methods_from(job) job.instance_methods.select do |method| JOB_INVOCATION_METHODS.include?(method) end.each_with_object([]) do |method, aggregate| parameters = job.instance_method(method).parameters.map do |(req, name)| SidekiqAdminEnquerer::WebApp::JobParamWrapper.new(job, method, name, req) end # => Array<JobParamWrapper> aggregate << new(job, method, parameters) # => JobMethodWrapper end end |