Class: Elasticsearch::Model::Extensions::DelayedJob::PartiallyUpdateDocumentJob
- Inherits:
-
DocumentJob
- Object
- DocumentJob
- Elasticsearch::Model::Extensions::DelayedJob::PartiallyUpdateDocumentJob
- Defined in:
- lib/elasticsearch/model/extensions/delayed_job/partially_update_document_job.rb
Instance Method Summary collapse
-
#initialize(params) ⇒ PartiallyUpdateDocumentJob
constructor
A new instance of PartiallyUpdateDocumentJob.
- #perform ⇒ Object
Methods inherited from DocumentJob
Constructor Details
#initialize(params) ⇒ PartiallyUpdateDocumentJob
Returns a new instance of PartiallyUpdateDocumentJob.
9 10 11 12 |
# File 'lib/elasticsearch/model/extensions/delayed_job/partially_update_document_job.rb', line 9 def initialize(params) super(record: params[:record]) @changes = params[:changes] end |
Instance Method Details
#perform ⇒ Object
14 15 16 17 18 |
# File 'lib/elasticsearch/model/extensions/delayed_job/partially_update_document_job.rb', line 14 def perform try_with_record do |record| record.partially_update_document(*@changes) end end |