Class: Liquid::Interrupt

Inherits:
Object
  • Object
show all
Defined in:
lib/liquid/interrupts.rb

Overview

An interrupt is any command that breaks processing of a block (ex: a for loop).

Direct Known Subclasses

BreakInterrupt, ContinueInterrupt

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message = nil) ⇒ Interrupt

Returns a new instance of Interrupt.



6
7
8
# File 'lib/liquid/interrupts.rb', line 6

def initialize(message = nil)
  @message = message || "interrupt".freeze
end

Instance Attribute Details

#messageObject (readonly)

Returns the value of attribute message.



4
5
6
# File 'lib/liquid/interrupts.rb', line 4

def message
  @message
end