Sha256: 5c78a0f8bb41721a5a4fff7d6f8be583d4fe672f2eeb3bb5404105d95eddb083

Contents?: true

Size: 458 Bytes

Versions: 9

Compression:

Stored size: 458 Bytes

Contents

require "zeitwerk"

module Pipedream
  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
        loader.setup
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
pipedream-0.4.8 lib/pipedream/autoloader.rb
pipedream-0.4.7 lib/pipedream/autoloader.rb
pipedream-0.4.6 lib/pipedream/autoloader.rb
pipedream-0.4.5 lib/pipedream/autoloader.rb
pipedream-0.4.4 lib/pipedream/autoloader.rb
pipedream-0.4.3 lib/pipedream/autoloader.rb
pipedream-0.4.2 lib/pipedream/autoloader.rb
pipedream-0.4.1 lib/pipedream/autoloader.rb
pipedream-0.4.0 lib/pipedream/autoloader.rb