Module: Linter

Defined in:
lib/linter.rb,
lib/linter/cli.rb,
lib/linter/version.rb,
lib/linter/misused_words.rb,
lib/linter/base_association.rb,
lib/linter/gender_association.rb,
lib/linter/mindset_association.rb,
lib/linter/pronoun_association.rb

Defined Under Namespace

Classes: BaseAssociation, CLI, Error, GenderAssociation, MindsetAssociation, MisusedWords, PronounAssociation

Constant Summary collapse

VERSION =
'0.1.15'

Class Method Summary collapse

Class Method Details

.analyze(text, job_ad: false) ⇒ Object



19
20
21
22
23
24
25
26
27
# File 'lib/linter.rb', line 19

def analyze(text, job_ad: false)
  response = {
    gender_association_analysis: Linter::GenderAssociation.analyze(text),
    pronoun_analysis: Linter::PronounAssociation.analyze(text),
    misused_words_analysis: Linter::MisusedWords.analyze(text)
  }
  response[:mindset_association_analysis] = Linter::MindsetAssociation.analyze(text) if job_ad
  response
end

.sourcesObject



29
30
31
32
# File 'lib/linter.rb', line 29

def sources
  file_path = File.join(__dir__, '../data/sources.yml')
  YAML.load_file(file_path)
end