Sha256: 8a728c2c1e5e69604318b620eb3d7a659a98663268c205fa32d5a0c5370674d9

Contents?: true

Size: 455 Bytes

Versions: 11

Compression:

Stored size: 455 Bytes

Contents

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".freeze
    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

11 entries across 11 versions & 3 rubygems

Version Path
liquid-4.0.4 lib/liquid/interrupts.rb
metanorma-cli-1.3.4 gems/ruby/2.6.0/gems/liquid-4.0.3/lib/liquid/interrupts.rb
metanorma-cli-1.3.3.1 gems/ruby/2.6.0/gems/liquid-4.0.3/lib/liquid/interrupts.rb
liquid-4.0.3 lib/liquid/interrupts.rb
liquid-4.0.2 lib/liquid/interrupts.rb
liquid-4-0-2-4.0.2 lib/liquid/interrupts.rb
liquid-4.0.1 lib/liquid/interrupts.rb
liquid-4.0.0 lib/liquid/interrupts.rb
liquid-4.0.0.rc3 lib/liquid/interrupts.rb
liquid-4.0.0.rc2 lib/liquid/interrupts.rb
liquid-4.0.0.rc1 lib/liquid/interrupts.rb