Method: Verbal#start_of_line

Defined in:
lib/verbal.rb

#start_of_lineObject

Marks the expression to start at the beginning of a line.

Examples:

Add a hyphen to the beginning of each line.

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


41
42
43
# File 'lib/verbal.rb', line 41

def start_of_line
  @prefixes = '^'
end