Sha256: eea5dff364ff812c07e4af915e1b74f181ff862cc05bc874672a9e1576f37bce
Contents?: true
Size: 443 Bytes
Versions: 8
Compression:
Stored size: 443 Bytes
Contents
class FuzzyMatch # A rule characterized by a regexp. Abstract. class Rule attr_reader :regexp def initialize(regexp) unless regexp.is_a?(::Regexp) raise ArgumentError, "[FuzzyMatch] Rules must be set with Regexp objects, but got #{regexp.inspect} (#{regexp.class.name})" end @regexp = regexp end def ==(other) other.class == self.class and regexp == other.regexp end end end
Version data entries
8 entries across 8 versions & 2 rubygems