ammar/regexp_parser

View on GitHub
lib/regexp_parser/expression/methods/match.rb

Summary

Maintainability
A
0 mins
Test Coverage
module Regexp::Expression
  class Base
    def match?(string)
      !!match(string)
    end
    alias :matches? :match?

    def match(string, offset = 0)
      Regexp.new(to_s).match(string, offset)
    end
    alias :=~ :match
  end
end