<commit_before>module MountainView
  class Component
    attr_reader :name

    def initialize(name)
      @name = name
    end

    def title
      @name.humanize
    end

    def styleguide_stubs
      YAML.load_file(stubs_file) || {}
    rescue Errno::ENOENT
      {}
    end

    def extracted_stubs
      if styleguide_stubs.is_a?(Hash)
        # Stub is coming from Style Guide example file
        styleguide_stubs[:stubs] || {}
      elsif styleguide_stubs.is_a?(Array)
        # Stub is coming from use of component
        styleguide_stubs
      end
    end

    def component_stubs
      stub_array = []
      extracted_stubs.each do | component_properties |
        stub_array << MountainView::Stub.new(component_properties)
      end
    end

    def component_stubs?
      component_stubs.any?
    end
<commit_msg>Return seems to be needed, despite linter objections<commit_after>module MountainView
  class Component
    attr_reader :name

    def initialize(name)
      @name = name
    end

    def title
      @name.humanize
    end

    def styleguide_stubs
      YAML.load_file(stubs_file) || {}
    rescue Errno::ENOENT
      {}
    end

    def extracted_stubs
      if styleguide_stubs.is_a?(Hash)
        # Stub is coming from Style Guide example file
        styleguide_stubs[:stubs] || {}
      elsif styleguide_stubs.is_a?(Array)
        # Stub is coming from use of component
        styleguide_stubs
      end
    end

    def component_stubs
      stub_array = []
      extracted_stubs.each do | component_properties |
        stub_array << MountainView::Stub.new(component_properties)
      end
      return stub_array
    end

    def component_stubs?
      component_stubs.any?
    end

{'fraction_non_alphanumeric': 0.06340895869691682, 'fraction_numerical': 0.0, 'mean_word_length': 2.3333333333333335, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, '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': '1660356', 'n_tokens_mistral': 539, 'n_tokens_neox': 547, 'n_words': 129}