def matches(line, &warning_handler)
      if @teaser.nil? || @teaser =~ line
        if match_data = line.match(@regexp)
          return { line_definition: self, captures: match_data.captures }
        else
          if @teaser && warning_handler
            warning_handler.call(:teaser_check_failed, "Teaser matched for #{name.inspect}, but full line did not:\n#{line.inspect}")
          end
          return false
        end
      else
        return false
      end
    rescue
      return false
    end
def matches(line, &warning_handler)
      if @teaser.nil? || @teaser =~ line
        if match_data = line.match(@regexp)
          return { line_definition: self, captures: match_data.captures }
        else
          if @teaser && warning_handler
            warning_handler.call(:teaser_check_failed, "Teaser matched for #{name.inspect}, but full line did not:\n#{line.inspect}")
          end
          return false
        end
      else
        return false
      end
    rescue
      return false
    end
Checks whether a given line matches this definition.
 It will return false if a line does not match. If the line matches, a hash is returned
 with all the fields parsed from that line as content.
 If the line definition has a teaser-check, a :teaser_check_failed warning will be emitted
 if this teaser-check is passed, but the full regular exprssion does not ,atch.