Remove reserved word Interrupt to avoid confusion

Also resolves rubocop conflicts
This commit is contained in:
Mike Angell
2019-09-11 06:32:31 +10:00
parent 1f90a37b63
commit a5b387cdd4

View File

@@ -1,6 +1,6 @@
module Liquid
# An interrupt is any command that breaks processing of a block (ex: a for loop).
class Interrupt
# A block interrupt is any command that breaks processing of a block (ex: a for loop).
class BlockInterrupt
attr_reader :message
def initialize(message = nil)
@@ -9,8 +9,8 @@ module Liquid
end
# Interrupt that is thrown whenever a {% break %} is called.
class BreakInterrupt < RuntimeError; end
class BreakInterrupt < BlockInterrupt; end
# Interrupt that is thrown whenever a {% continue %} is called.
class ContinueInterrupt < RuntimeError; end
class ContinueInterrupt < BlockInterrupt; end
end