Method: Chewy::Strategy#pop

Defined in:
lib/chewy/strategy.rb

#popObject



50
51
52
53
54
55
56
# File 'lib/chewy/strategy.rb', line 50

def pop
  raise "Can't pop root strategy" if @stack.one?

  result = @stack.pop.tap(&:leave)
  debug "[#{@stack.size}] -> #{result.name}, now #{current.name}" if @stack.size > 1
  result
end