Sha256: 651ad53f1f5932d930bd8aa77435169a754f399c271e9ad53b9e6b77bf76448b

Contents?: true

Size: 529 Bytes

Versions: 20

Compression:

Stored size: 529 Bytes

Contents

module SlimLint::Matcher
  # Represents a Sexp pattern implementing complex matching logic.
  #
  # Subclasses can implement custom logic to create complex matches that can be
  # reused across linters, DRYing up matching code.
  #
  # @abstract
  class Base
    # Whether this matcher matches the specified object.
    #
    # This must be implemented by subclasses.
    #
    # @param other [Object]
    # @return [Boolean]
    def match?(*)
      raise NotImplementedError, 'Matcher must implement `match?`'
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
slim_lint-0.15.1 lib/slim_lint/matcher/base.rb
slim_lint-0.15.0 lib/slim_lint/matcher/base.rb
slim_lint-0.14.0 lib/slim_lint/matcher/base.rb
slim_lint-0.13.0 lib/slim_lint/matcher/base.rb
slim_lint-0.12.0 lib/slim_lint/matcher/base.rb
slim_lint-0.11.0 lib/slim_lint/matcher/base.rb
slim_lint-0.10.0 lib/slim_lint/matcher/base.rb
slim_lint-0.9.0 lib/slim_lint/matcher/base.rb
slim_lint-0.8.3 lib/slim_lint/matcher/base.rb
slim_lint-0.8.2 lib/slim_lint/matcher/base.rb
slim_lint-0.8.1 lib/slim_lint/matcher/base.rb
slim_lint-0.8.0 lib/slim_lint/matcher/base.rb
slim_lint-0.7.2 lib/slim_lint/matcher/base.rb
slim_lint-0.7.1 lib/slim_lint/matcher/base.rb
slim_lint-0.7.0 lib/slim_lint/matcher/base.rb
slim_lint-0.6.1 lib/slim_lint/matcher/base.rb
slim_lint-0.6.0 lib/slim_lint/matcher/base.rb
slim_lint-0.5.0 lib/slim_lint/matcher/base.rb
slim_lint-0.4.0 lib/slim_lint/matcher/base.rb
slim_lint-0.3.0 lib/slim_lint/matcher/base.rb