Sha256: 6f93871120c74dbf1b3ff00921c02970e72e70b9683039204f561bfa84411570

Contents?: true

Size: 447 Bytes

Versions: 15

Compression:

Stored size: 447 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"
    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

15 entries across 15 versions & 5 rubygems

Version Path
liquid-2.6.3 lib/liquid/interrupts.rb
liquid-2.6.2 lib/liquid/interrupts.rb
liquid-2.6.1 lib/liquid/interrupts.rb
liquid-2.5.5 lib/liquid/interrupts.rb
mango-0.8.0 vendor/bundler/ruby/2.1.0/gems/liquid-2.6.0/lib/liquid/interrupts.rb
liquid-2.6.0 lib/liquid/interrupts.rb
liquid-2.5.4 lib/liquid/interrupts.rb
liquid-2.6.0.rc1 lib/liquid/interrupts.rb
liquid-2.5.3 lib/liquid/interrupts.rb
locomotivecms-liquid-2.6.0 lib/liquid/interrupts.rb
liquid-2.5.1 lib/liquid/interrupts.rb
wordify_liquid-2.5.1 lib/liquid/interrupts.rb
liquid-2.5.0 lib/liquid/interrupts.rb
locomotive_liquid-2.4.2 lib/liquid/interrupts.rb
locomotive_liquid-2.4.1 lib/liquid/interrupts.rb