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

Version Path
cocoapods-dependency-html-0.0.2 vendor/bundle/gems/fuzzy_match-2.0.4/lib/fuzzy_match/rule.rb
cocoapods-dependency-html-0.0.1 vendor/bundle/gems/fuzzy_match-2.0.4/lib/fuzzy_match/rule.rb
fuzzy_match-2.1.0 lib/fuzzy_match/rule.rb
fuzzy_match-2.0.4 lib/fuzzy_match/rule.rb
fuzzy_match-2.0.3 lib/fuzzy_match/rule.rb
fuzzy_match-2.0.2 lib/fuzzy_match/rule.rb
fuzzy_match-2.0.1 lib/fuzzy_match/rule.rb
fuzzy_match-2.0.0 lib/fuzzy_match/rule.rb