Class: Sidekiq::Tasks::Web::Params
- Inherits:
-
Object
- Object
- Sidekiq::Tasks::Web::Params
- Defined in:
- lib/sidekiq/tasks/web/params.rb
Instance Attribute Summary collapse
-
#params ⇒ Object
readonly
Returns the value of attribute params.
-
#task ⇒ Object
readonly
Returns the value of attribute task.
Instance Method Summary collapse
-
#initialize(task, params) ⇒ Params
constructor
A new instance of Params.
-
#permit! ⇒ Hash
Returns the permitted params.
Constructor Details
#initialize(task, params) ⇒ Params
Returns a new instance of Params.
9 10 11 12 |
# File 'lib/sidekiq/tasks/web/params.rb', line 9 def initialize(task, params) @task = task @params = params end |
Instance Attribute Details
#params ⇒ Object (readonly)
Returns the value of attribute params.
5 6 7 |
# File 'lib/sidekiq/tasks/web/params.rb', line 5 def params @params end |
#task ⇒ Object (readonly)
Returns the value of attribute task.
5 6 7 |
# File 'lib/sidekiq/tasks/web/params.rb', line 5 def task @task end |
Instance Method Details
#permit! ⇒ Hash
Returns the permitted params.
18 19 20 21 22 23 24 25 |
# File 'lib/sidekiq/tasks/web/params.rb', line 18 def permit! case params when NilClass then {} when Hash then permit_hash! else raise Sidekiq::Tasks::ArgumentError, "Invalid parameters: #{params.inspect}" end end |