lib/halog.rb
def require_all_libs_relative_to(fname)
        prepend   = File.basename(fname,".rb")
        search_me = File.join(File.dirname(fname),prepend)
     
        Dir.entries(search_me).each do |rb|
            if File.extname(rb) == ".rb" then
                require "#{prepend}/#{File.basename(rb,".rb")}"
            end
        end
    end
# 
# Utility method to require all files ending in .rb in the directory
# with the same name as this file minus .rb
#
Utility method to require all files ending in .rb in the directory
with the same name as this file minus .rb
Utility method to require all files ending in . rb in the directory with the same name as this file minus . rb
def require_all_libs_relative_to(fname)
        prepend   = File.basename(fname,".rb")
        search_me = File.join(File.dirname(fname),prepend)
        Dir.entries(search_me).each do |rb|
            if File.extname(rb) == ".rb" then
                require "#{prepend}/#{File.basename(rb,".rb")}"
            end
        end
    end
def require_all_libs_relative_to ( fname ) prepend = File . basename ( fname , ".rb" ) search_me = File . join ( File . dirname ( fname ) , prepend ) Dir . entries ( search_me ) . each do | rb | if File . extname ( rb ) == ".rb" then require "#{prepend}/#{File.basename(rb,".rb")}" end end end
Utility method to require all files ending in .rb in the directory
with the same name as this file minus .rb
Utility method to require all files ending in . rb in the directory with the same name as this file minus . rb
fname