<commit_before>require 'sinatra/base'
require 'easy_breadcrumbs/version'
require 'easy_breadcrumbs/breadcrumb'

module Sinatra
  include ::EasyBreadcrumbs

  module EasyBreadcrumbs
    Breadcrumb = ::EasyBreadcrumbs::Breadcrumb

    def easy_breadcrumbs
      # Path from current Rack::Request object
      request_path = request.path

      # All GET request routes
      route_matchers = Sinatra::Application.routes['GET'].map { |route| route[0] }

      # The rest is handled by Breadcrumb class
      breadcrumb = Breadcrumb.new(request_path, route_matchers)
      breadcrumb.to_html
    end
  end

  # Register helper with Sinatra::Application
  helpers EasyBreadcrumbs
end<commit_msg>Fix issue for modular style applications by accessing sinatra routes through self.class rather than Sinatra::Application.<commit_after>require 'sinatra/base'
require 'easy_breadcrumbs/version'
require 'easy_breadcrumbs/breadcrumb'

module Sinatra
  include ::EasyBreadcrumbs

  module EasyBreadcrumbs
    Breadcrumb = ::EasyBreadcrumbs::Breadcrumb

    def easy_breadcrumbs
      # Path from current Rack::Request object
      request_path = request.path

      # All GET request routes
      route_matchers = self.class.routes['GET'].map { |route| route[0] }

      # The rest is handled by Breadcrumb class
      breadcrumb = Breadcrumb.new(request_path, route_matchers)
      breadcrumb.to_html
    end
  end

  # Register helper with Sinatra::Application
  helpers EasyBreadcrumbs
end
{'fraction_non_alphanumeric': 0.06968876860622462, 'fraction_numerical': 0.0013531799729364006, 'mean_word_length': 4.030612244897959, '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': '3359060', 'n_tokens_mistral': 462, 'n_tokens_neox': 453, 'n_words': 115}