Sha256: fe81974471ff7d023cbf3037c7cb6131275e06ab26883be1da43513be9a16fa1
Contents?: true
Size: 1.02 KB
Versions: 38
Compression:
Stored size: 1.02 KB
Contents
# frozen_string_literal: true def package_require(path) list = path.split('/') package_name = list.shift.to_sym packages_facade = Ree.container.packages_facade package = packages_facade.get_package(package_name) return false if package.dir.nil? path = File.join( Ree::PathHelper.abs_package_module_dir(package), list.join('/') ) if !File.exist?(path) path = path + '.rb' end if !File.exist?(path) raise Ree::Error.new("file not found: #{path}") end Ree.logger.debug("package_require(#{path})") packages_facade.load_package_entry(package_name) packages_facade.load_file(path, package_name) end def package_file_exists?(path) list = path.split('/') package_name = list.shift.to_sym packages_facade = Ree.container.packages_facade package = packages_facade.get_package(package_name) return false if package.dir.nil? path = File.join( Ree::PathHelper.abs_package_module_dir(package), list.join('/') ) return true if File.exist?(path) path = path + '.rb' File.exist?(path) end
Version data entries
38 entries across 38 versions & 1 rubygems