<commit_before>require 'active_support/concern'

module WebUIComponents
  module Core
    class Component
      # Provides building block functionality to allow components to specify how
      # their content should be rendered, and what rendering that content will require
      # on the target system
      module BuildingBlocks
        extend ActiveSupport::Concern

        # Instance methods defined here will be added to the extending class's singleton class.
        module ClassMethods

          # Specify the building blocks that make up the content of this component
          def building_blocks set_name = :default, &building_block_set
            building_blocks_store[set_name] = building_block_set
          end

          # Has this component had building blocks defined?
          def has_building_blocks?
            !building_blocks_store.empty?
          end

          # Has this component had a specified named building block set defined?
          def has_building_block_set? set_name = :default
            !building_blocks_store[set_name].nil?
          end

          private

          def building_blocks_store
            @building_bocks ||= Hash.new
          end

        end

      end
    end
  end
end<commit_msg>added some documentation for a private api method<commit_after>require 'active_support/concern'

module WebUIComponents
  module Core
    class Component
      # Provides building block functionality to allow components to specify how
      # their content should be rendered, and what rendering that content will require
      # on the target system
      module BuildingBlocks
        extend ActiveSupport::Concern

        # Instance methods defined here will be added to the extending class's singleton class.
        module ClassMethods

          # Specify the building blocks that make up the content of this component
          def building_blocks set_name = :default, &building_block_set
            building_blocks_store[set_name] = building_block_set
          end

          # Has this component had building blocks defined?
          def has_building_blocks?
            !building_blocks_store.empty?
          end

          # Has this component had a specified named building block set defined?
          def has_building_block_set? set_name = :default
            !building_blocks_store[set_name].nil?
          end

          private

          # provides an accessor and allows to lazily initialize the building blocks stored in the component
          # @private
          def building_blocks_store
            @building_bocks ||= Hash.new
          end

        end

      end
    end
  end
end
{'fraction_non_alphanumeric': 0.034184823441021785, 'fraction_numerical': 0.0, 'mean_word_length': 2.3204488778054864, 'pattern_counts': {'":': 0, '<': 3, '<?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': '133107', 'n_tokens_mistral': 624, 'n_tokens_neox': 605, 'n_words': 246}