Class: Sidekiq::Control::Web::ParamsParser
- Inherits:
-
Object
- Object
- Sidekiq::Control::Web::ParamsParser
- Defined in:
- lib/sidekiq/control/web/params_parser.rb
Instance Attribute Summary collapse
-
#job ⇒ Object
readonly
Returns the value of attribute job.
-
#params ⇒ Object
readonly
Returns the value of attribute params.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(job, params) ⇒ ParamsParser
constructor
A new instance of ParamsParser.
- #values ⇒ Object
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
#job ⇒ Object (readonly)
Returns the value of attribute job.
7 8 9 |
# File 'lib/sidekiq/control/web/params_parser.rb', line 7 def job @job end |
#params ⇒ Object (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
#values ⇒ Object
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 |