mirror of
https://github.com/kemko/liquid.git
synced 2026-01-07 02:35:40 +03:00
18 lines
454 B
Ruby
18 lines
454 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
|