mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-15 08:50:45 -07:00
* Enabled frozen string literals * Update rubocop config * Prefer string interpolation in simple cases Co-Authored-By: Dylan Thacker-Smith <[email protected]>
19 lines
479 B
Ruby
19 lines
479 B
Ruby
# frozen_string_literal: true
|
|
|
|
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
|