Class: Arugula::EOLPart

Inherits:
Part
  • Object
show all
Defined in:
lib/arugula/parts.rb

Instance Method Summary collapse

Methods inherited from Part

all, inherited, type

Instance Method Details

#match(str, index) ⇒ Object



142
143
144
145
146
# File 'lib/arugula/parts.rb', line 142

def match(str, index)
  matches = str[index] == "\n" || index == str.size
  return true, index + 1 if matches
  [false, index]
end

#to_sObject



138
139
140
# File 'lib/arugula/parts.rb', line 138

def to_s
  '$'
end