Method: Verbal#end_of_string

Defined in:
lib/verbal.rb

#end_of_stringObject

Marks the expression to start at the end of the string.

Examples:

Matching the entire string

verbal = Verbal.new do
  start_of_string
  find 'dinosaur'
  end_of_string
end
verbal.match('dinosaur')  # matches
verbal.match('dinosaurs') # does not match

78
79
80
# File 'lib/verbal.rb', line 78

def end_of_string
  @suffixes += '\z'
end