Class: Henitai::SyntaxValidator

Inherits:
Object
  • Object
show all
Defined in:
lib/henitai/syntax_validator.rb

Overview

Validates that a mutant can be rendered and compiled as Ruby source.

Instance Method Summary collapse

Constructor Details

#initializeSyntaxValidator

Returns a new instance of SyntaxValidator.



8
9
10
# File 'lib/henitai/syntax_validator.rb', line 8

def initialize
  @stillborn_filter = StillbornFilter.new
end

Instance Method Details

#valid?(mutant) ⇒ Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/henitai/syntax_validator.rb', line 12

def valid?(mutant)
  !@stillborn_filter.suppressed?(mutant)
end