Sha256: 5e39cb1688fd576fa209ac05140f393c4798f9304fb10af61670b58c37de9fe3

Contents?: true

Size: 504 Bytes

Versions: 10

Compression:

Stored size: 504 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

10 entries across 10 versions & 1 rubygems

Version Path
lotusrb-0.6.1 lib/lotus/config/load_paths.rb
lotusrb-0.6.0 lib/lotus/config/load_paths.rb
lotusrb-0.5.0 lib/lotus/config/load_paths.rb
lotusrb-0.4.1 lib/lotus/config/load_paths.rb
lotusrb-0.4.0 lib/lotus/config/load_paths.rb
lotusrb-0.3.2 lib/lotus/config/load_paths.rb
lotusrb-0.3.1 lib/lotus/config/load_paths.rb
lotusrb-0.3.0 lib/lotus/config/load_paths.rb
lotusrb-0.2.1 lib/lotus/config/load_paths.rb
lotusrb-0.2.0 lib/lotus/config/load_paths.rb