Class: StringMatcher::Regex

Inherits:
Object
  • Object
show all
Defined in:
lib/string_matcher/regex.rb

Class Method Summary collapse

Class Method Details

.match?(string, regexp) ⇒ Boolean

Returns:

  • (Boolean)


3
4
5
# File 'lib/string_matcher/regex.rb', line 3

def self.match?(string, regexp)
  string.match? Regexp.new regexp
end