lib/my_scripts.rb in my_scripts-0.0.4 vs lib/my_scripts.rb in my_scripts-0.0.6
- old
+ new
@@ -1,8 +1,17 @@
\ No newline at end of file
+module MyScripts
+ def self.require_libs( filename, filemask )
+ file = ::File.expand_path(::File.join(::File.dirname(filename), filemask.gsub(/(?<!.rb)$/,'.rb')))
+ require file if File.exist?(file) && !File.directory?(file)
+ Dir.glob(file).sort.each {|rb| require rb}
+ end
+end # module MyScripts
+
+%W[my_scripts/script my_scripts/cli **/*].each {|rb| MyScripts.require_libs(__FILE__, rb)}