module CHISE
def windows?()
rp = RUBY_PLATFORM
- rp =~ /cygwin/ || rp =~ /mswin32/ || rp =~ /mingw32/
+ rp.index("cygwin") || rp.index("mswin32") || rp.index("mingw32")
end
module_function :windows?
class Config
include Singleton
+
def initialize
@base_dir = File.expand_path(File.dirname(__FILE__)+"/../..")
-# @base_dir = "c:/chise"
-# qp @base_dir
+ @csf_dir = @base_dir+"/csf"
if CHISE.windows?()
@db_dir = @base_dir+"/char-db" # /sysmtem-char-id/ucs
@ids_dir = "/home/eto/chise/ids"
end
- @csf_dir = @base_dir+"/csf"
instance_variables.each {|name|
self.class.class_eval { attr_reader name.delete("@") }
}