Sha256: 7860ea8711f546f55cfdc9dd369d60e5f64854c2b347e5d5721b14710e72ed97
Contents?: true
Size: 727 Bytes
Versions: 14
Compression:
Stored size: 727 Bytes
Contents
require "zeitwerk" module Ufo class Autoloader class Inflector < Zeitwerk::Inflector def camelize(basename, _abspath) map = { cli: "CLI", version: "VERSION" } map[basename.to_sym] || super end end class << self def setup loader = Zeitwerk::Loader.new loader.inflector = Inflector.new loader.push_dir(File.dirname(__dir__)) # lib helpers = "#{ufo_root}/.ufo/helpers" loader.push_dir(helpers) if File.exist?(helpers) # project helpers loader.setup end # Autoloader runs so early that Ufo.root is not available, so we must declare it here def ufo_root ENV['UFO_ROOT'] || '.' end end end end
Version data entries
14 entries across 14 versions & 1 rubygems