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.



8
9
10
# File 'lib/liquid/interrupts.rb', line 8

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

Instance Attribute Details

#messageObject (readonly)

Returns the value of attribute message.



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

def message
  @message
end