Sha256: e2837241522a728a7fb4a03af7e13d7498c259c86864ca0ae9cee9a9e2462fe5

Contents?: true

Size: 503 Bytes

Versions: 1

Compression:

Stored size: 503 Bytes

Contents

require 'lotus/utils/load_paths'

module Lotus
  module Config
    # Define the load paths where the application should load
    #
    # @since 0.1.0
    # @api private
    class LoadPaths < Utils::LoadPaths
      PATTERN = '**/*.rb'.freeze

      def load!(root)
        @root = root

        each do |path|
          Dir.glob(path.join(PATTERN)).each {|file| require file }
        end
      end

      protected
      def realpath(path)
        @root.join(path).realpath
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
lotusrb-0.1.0 lib/lotus/config/load_paths.rb