Sha256: 60a92706d8637ed987843fc94e59746ba47f1eea733f39498e371c70e4661051

Contents?: true

Size: 454 Bytes

Versions: 12

Compression:

Stored size: 454 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

12 entries across 12 versions & 2 rubygems

Version Path
locomotivecms-liquid-4.0.0 lib/liquid/interrupts.rb
liquid-3.0.6 lib/liquid/interrupts.rb
liquid-3.0.5 lib/liquid/interrupts.rb
liquid-3.0.4 lib/liquid/interrupts.rb
liquid-3.0.3 lib/liquid/interrupts.rb
liquid-3.0.2 lib/liquid/interrupts.rb
locomotivecms-liquid-4.0.0.alpha2 lib/liquid/interrupts.rb
locomotivecms-liquid-4.0.0.alpha1 lib/liquid/interrupts.rb
locomotivecms-liquid-4.0.0.alpha lib/liquid/interrupts.rb
liquid-3.0.1 lib/liquid/interrupts.rb
liquid-3.0.0 lib/liquid/interrupts.rb
liquid-3.0.0.rc1 lib/liquid/interrupts.rb