Sha256: 852796871532c8b6668486896802b79e8b74c830210680ed2c3eecca129b9d67

Contents?: true

Size: 940 Bytes

Versions: 1

Compression:

Stored size: 940 Bytes

Contents

autoload :Path,     'epitools/path'
autoload :Browser,  'epitools/browser'
autoload :Rash,     'epitools/rash'
autoload :Ratio,    'epitools/ratio'
autoload :Sys,      'epitools/sys'

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[
  basetypes 
  niceprint
  string_to_proc
  zopen
  colored
  clitools
  permutations
  numwords
].each do |mod|
  require_wrapper.call mod
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
epitools-0.4.35 lib/epitools.rb