Class: Sidekiq::Control::Web::ParamsParser

Inherits:
Object
  • Object
show all
Defined in:
lib/sidekiq/control/web/params_parser.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(job, params) ⇒ ParamsParser

Returns a new instance of ParamsParser.



14
15
16
17
# File 'lib/sidekiq/control/web/params_parser.rb', line 14

def initialize(job, params)
  @job = job
  @params = params
end

Instance Attribute Details

#jobObject (readonly)

Returns the value of attribute job.



7
8
9
# File 'lib/sidekiq/control/web/params_parser.rb', line 7

def job
  @job
end

#paramsObject (readonly)

Returns the value of attribute params.



8
9
10
# File 'lib/sidekiq/control/web/params_parser.rb', line 8

def params
  @params
end

Class Method Details

.values(job, params) ⇒ Object



10
11
12
# File 'lib/sidekiq/control/web/params_parser.rb', line 10

def self.values(job, params)
  new(job, params).values
end

Instance Method Details

#valuesObject



19
20
21
22
23
# File 'lib/sidekiq/control/web/params_parser.rb', line 19

def values
  job.params.map do |param|
    param.value = extract_value(param.name)
  end
end