Class: RSpec::Sidekiq::NullBatch
- Inherits:
-
NullObject
- Object
- NullObject
- RSpec::Sidekiq::NullBatch
- Defined in:
- lib/rspec/sidekiq/batch.rb
Instance Attribute Summary collapse
-
#bid ⇒ Object
readonly
Returns the value of attribute bid.
Instance Method Summary collapse
-
#initialize(bid = nil) ⇒ NullBatch
constructor
A new instance of NullBatch.
- #jobs ⇒ Object
- #status ⇒ Object
Methods inherited from NullObject
Constructor Details
#initialize(bid = nil) ⇒ NullBatch
Returns a new instance of NullBatch.
15 16 17 |
# File 'lib/rspec/sidekiq/batch.rb', line 15 def initialize(bid = nil) @bid = bid || SecureRandom.hex(8) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class RSpec::Sidekiq::NullObject
Instance Attribute Details
#bid ⇒ Object (readonly)
Returns the value of attribute bid.
13 14 15 |
# File 'lib/rspec/sidekiq/batch.rb', line 13 def bid @bid end |
Instance Method Details
#jobs ⇒ Object
23 24 25 |
# File 'lib/rspec/sidekiq/batch.rb', line 23 def jobs(*) yield end |
#status ⇒ Object
19 20 21 |
# File 'lib/rspec/sidekiq/batch.rb', line 19 def status NullStatus.new(@bid) end |