Sha256: fb22fc47f4361c898e24371f8e3446811b6ff7d417be6c25c26ac8faee31832b
Contents?: true
Size: 749 Bytes
Versions: 4
Compression:
Stored size: 749 Bytes
Contents
class Knj::Fs @drivers = [] drivers_path = Knj::Php.realpath("#{File.dirname(__FILE__)}/drivers") Dir.new(drivers_path).each do |file| fn = "#{drivers_path}/#{file}" next if file == "." or file == ".." or File.directory?(fn) class_name = Knj::Php.ucwords(file.slice(0..-4)).to_sym print "Classname: #{class_name}\n" autoload class_name, fn @drivers << { :name => file.slice(0..-4), :args => const_get(class_name).args } end def self.drivers return @drivers end def initialize(args = {}) @args = args end def spawn_driver class_name = Knj::Php.ucwords(@args[:driver]) @driver = self.class.const_get(class_name).new(:fs => self, :args => @args) end end class Knj::Fs::File def initialize end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
knjrbfw-0.0.8 | lib/knj/fs/fs.rb |
knjrbfw-0.0.7 | lib/knj/fs/fs.rb |
knjrbfw-0.0.4 | lib/knj/fs/fs.rb |
knjrbfw-0.0.3 | lib/knj/fs/fs.rb |