Sha256: d4dc58ff805918e17b1aa78dd79d66f299858a7157e0551ce7d7575a86e0d9f1
Contents?: true
Size: 757 Bytes
Versions: 4
Compression:
Stored size: 757 Bytes
Contents
module Zeus class Server class LoadTracking class << self def add_feature(file) path = if File.exist?(File.expand_path(file)) File.expand_path(file) else find_in_load_path(file) end Zeus.add_extra_feature(path) if path end private def find_in_load_path(file) $LOAD_PATH.map { |path| "#{path}/#{file}" }.detect{ |file| File.exist? file } end end end end end module Kernel def load(file, *a) Kernel.load(file, *a) end class << self alias_method :__load_without_zeus, :load def load(file, *a) Zeus::Server::LoadTracking.add_feature(file) __load_without_zeus(file, *a) end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
zeus-0.10.0 | lib/zeus/load_tracking.rb |
zeus-0.10.0.pre3 | lib/zeus/load_tracking.rb |
zeus-0.10.0.pre2 | lib/zeus/load_tracking.rb |
zeus-0.10.0.pre | lib/zeus/load_tracking.rb |