Class: Mutant::Matcher::Compiler::SubjectPrefix

Inherits:
Object
  • Object
show all
Defined in:
lib/mutant/matcher/compiler.rb

Overview

Subject expression prefix predicate

Instance Method Summary collapse

Instance Method Details

#call(subject) ⇒ Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Test if subject expression is matched by prefix

Returns:

  • (Boolean)

31
32
33
# File 'lib/mutant/matcher/compiler.rb', line 31

def call(subject)
  expression.prefix?(subject.expression)
end