class LetItCrash::Matcher

Constants

MATCHERS

Public Instance Methods

matches?() click to toggle source

This method performs a :reek:NilCheck.

# File lib/letitcrash/matcher.rb, line 12
def matches?
  !matcher.nil?
end

Private Instance Methods

matcher() click to toggle source
# File lib/letitcrash/matcher.rb, line 18
def matcher
  @matcher ||= MATCHERS.each do |klass|
    instance = klass.new(environment: environment)
    return instance if instance.matches?
  end
  nil
end