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, _match_data) ⇒ Object


171
172
173
174
175
# File 'lib/arugula/parts.rb', line 171

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

#to_sObject


167
168
169
# File 'lib/arugula/parts.rb', line 167

def to_s
  '$'
end