Sha256: 9df96382ee7e3d7608b043314d0b340926124e53a4ed5ba64272f93ef685593a

Contents?: true

Size: 479 Bytes

Versions: 17

Compression:

Stored size: 479 Bytes

Contents

# frozen_string_literal: true

module Liquid
  # An interrupt is any command that breaks processing of a block (ex: a for loop).
  class Interrupt
    attr_reader :message

    def initialize(message = nil)
      @message = message || "interrupt"
    end
  end

  # Interrupt that is thrown whenever a {% break %} is called.
  class BreakInterrupt < Interrupt; end

  # Interrupt that is thrown whenever a {% continue %} is called.
  class ContinueInterrupt < Interrupt; end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
liquid-5.7.0 lib/liquid/interrupts.rb
liquid-5.6.4 lib/liquid/interrupts.rb
liquid-5.6.3 lib/liquid/interrupts.rb
liquid-5.6.2 lib/liquid/interrupts.rb
liquid-5.6.1 lib/liquid/interrupts.rb
liquid-5.6.0 lib/liquid/interrupts.rb
liquid-5.6.0.rc3 lib/liquid/interrupts.rb
liquid-5.6.0.rc2 lib/liquid/interrupts.rb
liquid-5.6.0.rc1 lib/liquid/interrupts.rb
liquid-5.5.1 lib/liquid/interrupts.rb
liquid-5.5.0 lib/liquid/interrupts.rb
liquid-5.4.0 lib/liquid/interrupts.rb
liquid-5.3.0 lib/liquid/interrupts.rb
liquid-5.2.0 lib/liquid/interrupts.rb
liquid-5.1.0 lib/liquid/interrupts.rb
liquid-5.0.1 lib/liquid/interrupts.rb
liquid-5.0.0 lib/liquid/interrupts.rb