Method: Verbal#start_of_string

Defined in:
lib/verbal.rb

#start_of_stringObject

Marks the expression to start at the beginning 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('a dinosaur') # does not match


65
66
67
# File 'lib/verbal.rb', line 65

def start_of_string
  @prefixes = '\A' + @prefixes
end