<commit_before>module Buoys
  module Helper
    @_buoys_renderer = nil
    # Declare the breadcrumb which want to render in view.
    #
    # <%= buoy :help, true %>
    def buoy(key, *args)
      @_buoys_renderer = Buoys::Renderer.new(self, key, *args)
    end
    alias_method :breadcrumb, :buoy

    # <% buoys.tap do |links| %>
    #   <% if links.any? %>
    #     <ul>
    #       <% links.each do |link| %>
    #         <li class="<%= link.class %>">
    #           <%= link_to link.text, link.url %>
    #         </li>
    #       <% end %>
    #     </ul>
    #   <% end %>
    # <% end %>
    def buoys
      return [] if @_buoys_renderer.nil?

      @_buoys_renderer.render
    end
    alias_method :breadcrumbs, :buoys
  end
end
<commit_msg>Refactor<commit_after>module Buoys
  module Helper
    # Declare the breadcrumb which want to render in view.
    #
    # <%= buoy :help, true %>
    def buoy(key, *args)
      @_buoys_renderer = Buoys::Renderer.new(self, key, *args)
    end
    alias_method :breadcrumb, :buoy

    # <% buoys.tap do |links| %>
    #   <% if links.any? %>
    #     <ul>
    #       <% links.each do |link| %>
    #         <li class="<%= link.class %>">
    #           <%= link_to link.text, link.url %>
    #         </li>
    #       <% end %>
    #     </ul>
    #   <% end %>
    # <% end %>
    def buoys
      buoys_renderer.render
    end
    alias_method :breadcrumbs, :buoys

    def buoys_renderer
      @_buoys_renderer ||= Buoys::Renderer.new(self, nil)
    end
  end
end

{'fraction_non_alphanumeric': 0.14941022280471822, 'fraction_numerical': 0.0, 'mean_word_length': 1.8542056074766355, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 29, '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': '1505282', 'n_tokens_mistral': 604, 'n_tokens_neox': 550, 'n_words': 123}