Sha256: 5d34fa9d2aee0e04ba292888f034ca4b9260cf2a992c2ae9df30b12f9b002bcf
Contents?: true
Size: 970 Bytes
Versions: 10
Compression:
Stored size: 970 Bytes
Contents
<% if settings.build_zeitwerk %> require "zeitwerk" <% if settings.project_levels.positive? %> Zeitwerk::Loader.new.then do |loader| loader.tag = "<%= settings.project_name %>" loader.push_dir "#{__dir__}<%= Array.new(settings.project_levels, "/..").join %>" loader.setup end <% else %> Zeitwerk::Loader.new.then do |loader| loader.tag = File.basename __FILE__, ".rb" loader.push_dir __dir__ loader.setup end <% end %> <% end %> <% if settings.build_zeitwerk %> <% namespace do %> <% if settings.project_levels.positive? %> def self.loader registry = Zeitwerk::Registry @loader ||= registry.loaders.find { |loader| loader.tag == "<%= settings.project_name %>" } end <% else %> def self.loader registry = Zeitwerk::Registry @loader ||= registry.loaders.find { |loader| loader.tag == File.basename(__FILE__, ".rb") } end <% end %> <% end %> <% else %> <% namespace %> <% end %>
Version data entries
10 entries across 10 versions & 1 rubygems