<commit_before>﻿class Bob
  hey: (said) ->
    return 'Fine. Be that way!' if @silence(said)
    return 'Whoa, chill out!' if @shouting(said)
    return 'Sure.' if @question(said)
    'Whatever.'

  silence: (said) -> said.trim() == ''

  shouting: (said) -> @upperCase(said) && @containsLetters(said)

  question: (said) -> @endsWith('?', said)

  upperCase: (said) -> said == said.toUpperCase()

  containsLetters: (said) -> said.match(/[A-Z]/i)

  endsWith: (ending, value) -> 
    value.length >= ending.length && 
    value.lastIndexOf(ending) == (value.length - ending.length)

module.exports = Bob<commit_msg>:wolf: CoffeeScript Bob - Private methods and idomatic<commit_after>﻿class Bob
  hey: (said) ->
    return 'Fine. Be that way!' if silence(said)
    return 'Whoa, chill out!' if shouting(said)
    return 'Sure.' if question(said)
    'Whatever.'

silence = (said) -> said.trim() is ''

shouting = (said) -> upperCase(said) and containsLetters(said)

question = (said) -> endsWith('?', said)

upperCase = (said) -> said is said.toUpperCase()

containsLetters = (said) -> said.match(/[A-Z]/i)

endsWith = (ending, value) -> 
  value.length >= ending.length and
  value.lastIndexOf(ending) is (value.length - ending.length)

module.exports = Bob
{'fraction_non_alphanumeric': 0.1740858505564388, 'fraction_numerical': 0.0, 'mean_word_length': 3.6977611940298507, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1752376', 'n_tokens_mistral': 458, 'n_tokens_neox': 420, 'n_words': 110}