nicojensen.de/vendor/bundle/gems/liquid-4.0.2/lib/liquid/interrupts.rb
Nico Jensen b59a203dbb Init
Init commit
2019-03-12 13:49:49 +01:00

16 lines
455 B
Ruby

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