Sha256: d260df7652b21e364ef8aa0d93f9222c7adc24b520e3b5853122967c823ab064
Contents?: true
Size: 783 Bytes
Versions: 11
Compression:
Stored size: 783 Bytes
Contents
class Object unless defined?(__DIR__) # # This method is convenience for the `File.expand_path(File.dirname(__FILE__))` idiom. # (taken from Michael Fellinger's Ramaze... thanx, dood! :D) # def __DIR__(*args) filename = caller[0][/^(.*):/, 1] dir = File.expand_path(File.dirname(filename)) ::File.expand_path(::File.join(dir, *args.map{|a| a.to_s})) end end end require_wrapper = proc do |mod| #p [:loading, mod] begin require File.join(__DIR__, "epitools", mod) rescue LoadError => e puts "* Error loading epitools/#{mod}: #{e}" end end %w[ metaclass basetypes niceprint string_to_proc ratio path zopen colored clitools permutations numwords ].each do |mod| require_wrapper.call mod end
Version data entries
11 entries across 11 versions & 1 rubygems