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



160
161
162
163
164
# File 'lib/arugula/parts.rb', line 160

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

#to_sObject



156
157
158
# File 'lib/arugula/parts.rb', line 156

def to_s
  '$'
end