mirror of
https://github.com/kemko/liquid.git
synced 2026-01-02 16:25:42 +03:00
* Enabled frozen string literals * Update rubocop config * Prefer string interpolation in simple cases Co-Authored-By: Dylan Thacker-Smith <dylan.smith@shopify.com>
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
|