rf-web/vendor/bundle/gems/liquid-4.0.3/lib/liquid/interrupts.rb

17 lines
455 B
Ruby
Raw Normal View History

2019-10-21 08:18:17 +00:00
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