Class: SlimLint::Matcher::Base Abstract

Inherits:
Object
  • Object
show all
Defined in:
lib/slim_lint/matcher/base.rb

Overview

This class is abstract.

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.

Direct Known Subclasses

Anything, Capture, Nothing

Instance Method Summary collapse

Instance Method Details

#match?Boolean

Whether this matcher matches the specified object.

This must be implemented by subclasses.

Parameters:

  • other (Object)

Returns:

  • (Boolean)

Raises:

  • (NotImplementedError)


17
18
19
# File 'lib/slim_lint/matcher/base.rb', line 17

def match?(*)
  raise NotImplementedError, 'Matcher must implement `match?`'
end