Class: Coconductor::Matchers::FieldAware

Inherits:
Licensee::Matchers::Exact
  • Object
show all
Includes:
Matcher
Defined in:
lib/coconductor/matchers/field_aware.rb

Instance Method Summary collapse

Methods included from Matcher

#potential_matches

Instance Method Details

#confidenceObject



16
17
18
# File 'lib/coconductor/matchers/field_aware.rb', line 16

def confidence
  100
end

#matchObject



8
9
10
11
12
13
14
# File 'lib/coconductor/matchers/field_aware.rb', line 8

def match
  return @match if defined? @match

  potential_matches.find do |code_of_conduct|
    file.content_normalized =~ regex_for(code_of_conduct)
  end
end