Sha256: 467cc419b223e8b0540a07a6033d2a001f5e3d36c1a4f921a6661bf27a330f4d

Contents?: true

Size: 387 Bytes

Versions: 1

Compression:

Stored size: 387 Bytes

Contents

# encoding: UTF-8

module Expert
  class ClasspathFile
    attr_reader :paths

    class << self
      def from_path(path)
        new(load(path))
      end

      protected

      def load(path)
        File.read(path).split(':')
      end
    end

    def initialize(paths)
      @paths = paths
    end

    def require_all
      paths.each { |p| Kernel.require(p) }
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
expert-1.0.0 lib/expert/classpath_file.rb