Sha256: 8d057285cb2e2ccc3ca8bda754f50fc25c540d183c57855f675132e18c8fc12a
Contents?: true
Size: 662 Bytes
Versions: 3
Compression:
Stored size: 662 Bytes
Contents
# Copyright (c) 2006 Michael Fellinger m.fellinger@gmail.com # All files in this distribution are subject to the terms of the Ruby license. # Extensions for Kernel module Kernel # Example: # aquire 'foo/bar/*' # requires all files inside foo/bar - recursive # can take multiple parameters, it's mainly used to require all the # snippets. def aquire *files files.each do |file| require file if %w(rb so).any?{|f| File.file?("#{file}.#{f}")} $:.each do |dir| Dir[File.join(dir, file, '*.rb')].each do |path| require path unless path == File.expand_path(__FILE__) end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
ramaze-0.1.1 | lib/ramaze/snippets/kernel/aquire.rb |
ramaze-0.1.2 | lib/ramaze/snippets/kernel/aquire.rb |
ramaze-0.1.3 | lib/ramaze/snippets/kernel/aquire.rb |