Class: RSpec::Sidekiq::NullStatus

Inherits:
NullObject show all
Defined in:
lib/rspec/sidekiq/batch.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from NullObject

#method_missing

Constructor Details

#initialize(bid) ⇒ NullStatus

Returns a new instance of NullStatus.



31
32
33
# File 'lib/rspec/sidekiq/batch.rb', line 31

def initialize(bid)
  @bid = bid
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class RSpec::Sidekiq::NullObject

Instance Attribute Details

#bidObject (readonly)

Returns the value of attribute bid.



29
30
31
# File 'lib/rspec/sidekiq/batch.rb', line 29

def bid
  @bid
end

Instance Method Details

#joinObject



35
36
37
# File 'lib/rspec/sidekiq/batch.rb', line 35

def join
  ::Sidekiq::Worker.drain_all
end

#totalObject



39
40
41
# File 'lib/rspec/sidekiq/batch.rb', line 39

def total
  ::Sidekiq::Worker.jobs.size
end