Top Level Namespace

Defined Under Namespace

Modules: ActiveRecord, Gamedata, Regexen Classes: Bombing, Fleet, Group, HashArray, Order, Planet, Product, Race, Report, Route, Section

Class Method Summary collapse

Class Method Details

.require_libs(filename, filemask) ⇒ Object

Used to auto-require all the source files located in lib/…



2
3
4
5
6
# File 'lib/galaxy.rb', line 2

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