Sha256: 0ae98456cf0d24349c1a216d3e053de26aff8a0760fa9091817b78b0e59740f7
Contents?: true
Size: 1.37 KB
Versions: 1
Compression:
Stored size: 1.37 KB
Contents
URLS http://codeforpeople.com/lib/ruby/autorequire/ http://rubyforge.org/frs/?group_id=1024 ABOUT autorequire is sleeker, more aerodynamic, greasier version of autoload. like autoload it's primary usage is to speed up the load time of large libraries which, themselves, do many requires. INSTALL gem install autorequire VERSION 0.0.0 HISTORY 0.0.0 : initial release AUTHOR ara [dot] t [dot] howard [at] noaa [dot] gov SAMPLES <========< emsg.rb >========> ~ > cat emsg.rb # # rescues err and prints msg - support method for samples/* # def emsg yield rescue Exception => e puts "#{ e } (#{ e.class })!" end <========< libgen.rb >========> ~ > cat libgen.rb # # generates a temporaray ruby lib - support method for samples/* # require 'fileutils' def libgen path, libdir = './.lib/' f, fu = File, FileUtils dirname, basename = f.split path dirname = f.join libdir, dirname fu.mkdir_p dirname path = f.join dirname, basename open(path,'w'){|fd| fd << yield} at_exit{ Dir.glob(f.join(libdir, '*')){|e| fu.rm_rf e} } path end @samples CAVEATS this library is experimental. nonetheless it's relatively straight forward and i have no plans to change it's interface - though i may add to it in future release. LICENSE same as ruby's
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
autorequire-0.0.0 | README.tmpl |