Method: Verbal#end_of_line

Defined in:
lib/verbal.rb

#end_of_lineObject

Marks the expression to end at the last character of a line.

Examples:

Add a hyphen to the end of each line.

lines = "first\nsecond\nthird"
verbal = Verbal.new do
  end_of_line
end
lines.gsub(verbal, '- ') # => "first- \nsecond- \nthird"


52
53
54
# File 'lib/verbal.rb', line 52

def end_of_line
  @suffixes = '$'
end