Class: Regexp

Inherits:
Object
  • Object
show all
Defined in:
lib/rr/core_ext/regexp.rb

Instance Method Summary collapse

Instance Method Details

#wildcard_match?(other) ⇒ Boolean

Returns:

  • (Boolean)


2
3
4
5
# File 'lib/rr/core_ext/regexp.rb', line 2

def wildcard_match?(other)
  self == other ||
  !!(other.is_a?(String) && other =~ self)
end