Class: Regexp

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

Instance Method Summary (collapse)

Instance Method Details

- (Boolean) wildcard_match?(other)

Returns:

  • (Boolean)


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

def wildcard_match?(other)
  return true if self == other
  return false unless other.is_a?(String)
  (other =~ self) ? true : false
end