<commit_before>require 'forwardable'

module VhdlConnector
  class EntityWrapper
    extend Forwardable
    include Helper

    def_instance_delegators :@entity, :name

    def initialize(entity)
      @entity = entity
    end

    def generics
      @generics ||= @entity.generics.map { |g| GenericWrapper.new(g) }
    end

    def ports
      @ports ||= @entity.ports.map { |g| PortWrapper.new(g) }
    end

    def to_component_definition
      View.new(
        template_path('component_definition.vhd.erb'),
        Presenters::ComponentDefinitionPresenter.new(self)
      ).run
    end

    def to_component_mappping
      View.new(
        template_path('component_mapping.vhd.erb'),
        Presenters::ComponentMappingPresenter.new(self)
      ).run
    end
  end
end
<commit_msg>Typo entity_wrapper<commit_after>require 'forwardable'

module VhdlConnector
  class EntityWrapper
    extend Forwardable
    include Helper

    def_instance_delegators :@entity, :name

    def initialize(entity)
      @entity = entity
    end

    def generics
      @generics ||= @entity.generics.map { |g| GenericWrapper.new(g) }
    end

    def ports
      @ports ||= @entity.ports.map { |g| PortWrapper.new(g) }
    end

    def to_component_definition
      View.new(
        template_path('component_definition.vhd.erb'),
        Presenters::ComponentDefinitionPresenter.new(self)
      ).run
    end

    def to_component_mapping
      View.new(
        template_path('component_mapping.vhd.erb'),
        Presenters::ComponentMappingPresenter.new(self)
      ).run
    end
  end
end

{'fraction_non_alphanumeric': 0.09222994314592546, 'fraction_numerical': 0.0, 'mean_word_length': 2.789473684210526, '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': '653932', 'n_tokens_mistral': 496, 'n_tokens_neox': 486, 'n_words': 97}