Module: RSpec::SidekiqPro::Batches

Defined in:
lib/rspec/sidekiq_pro/batches.rb

Defined Under Namespace

Modules: Props

Class Method Summary collapse

Class Method Details

.[](key) ⇒ Object



67
68
69
# File 'lib/rspec/sidekiq_pro/batches.rb', line 67

def [](key)
  Sidekiq::Batch.new(Props[key]["bid"])
end

.eachObject



59
60
61
62
63
64
65
# File 'lib/rspec/sidekiq_pro/batches.rb', line 59

def each
  return to_enum(:each) unless block_given?

  Props.each do |props|
    yield Sidekiq::Batch.new(props["bid"])
  end
end

.firstObject



71
72
73
# File 'lib/rspec/sidekiq_pro/batches.rb', line 71

def first
  Sidekiq::Batch.new(Props.first["bid"])
end

.lastObject



75
76
77
# File 'lib/rspec/sidekiq_pro/batches.rb', line 75

def last
  Sidekiq::Batch.new(Props.last["bid"])
end