Class: RSpec::Sidekiq::Matchers::NamedQueueJob Private

Inherits:
Object
  • Object
show all
Defined in:
lib/rspec/sidekiq/matchers/have_job.rb

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.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(entry) ⇒ NamedQueueJob

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.

Returns a new instance of NamedQueueJob.



245
246
247
248
# File 'lib/rspec/sidekiq/matchers/have_job.rb', line 245

def initialize(entry)
  @entry = entry
  @item = entry.respond_to?(:item) ? entry.item : entry
end

Instance Attribute Details

#entryObject (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.



243
244
245
# File 'lib/rspec/sidekiq/matchers/have_job.rb', line 243

def entry
  @entry
end

#itemObject (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.



243
244
245
# File 'lib/rspec/sidekiq/matchers/have_job.rb', line 243

def item
  @item
end

Instance Method Details

#argsObject

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.



258
259
260
# File 'lib/rspec/sidekiq/matchers/have_job.rb', line 258

def args
  entry.respond_to?(:args) ? entry.args : item["args"]
end

#error_classObject

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.



266
267
268
# File 'lib/rspec/sidekiq/matchers/have_job.rb', line 266

def error_class
  entry.respond_to?(:error_class) ? entry.error_class : item["error_class"]
end

#error_messageObject

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.



262
263
264
# File 'lib/rspec/sidekiq/matchers/have_job.rb', line 262

def error_message
  entry.respond_to?(:error_message) ? entry.error_message : item["error_message"]
end

#failed_atObject

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.



274
275
276
# File 'lib/rspec/sidekiq/matchers/have_job.rb', line 274

def failed_at
  entry.respond_to?(:failed_at) ? entry.failed_at : item["failed_at"]
end

#klassObject

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.



250
251
252
# File 'lib/rspec/sidekiq/matchers/have_job.rb', line 250

def klass
  entry.respond_to?(:klass) ? entry.klass.to_s : item["class"].to_s
end

#retry_countObject

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.



270
271
272
# File 'lib/rspec/sidekiq/matchers/have_job.rb', line 270

def retry_count
  entry.respond_to?(:retry_count) ? entry.retry_count : item["retry_count"]
end

#wrappedObject

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.



254
255
256
# File 'lib/rspec/sidekiq/matchers/have_job.rb', line 254

def wrapped
  item["wrapped"]
end