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.



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

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

Instance Attribute Details

#messageObject (readonly)

Returns the value of attribute message.



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

def message
  @message
end