Module | RbConfig |
In: |
lib/facets/standard/facets/rbconfig.rb
|
An extended rendition of the Ruby‘s standard RbConfig module.
Return the path to the data directory associated with the given library/package name. Normally this is just
"#{Config::CONFIG['datadir']}/#{name}"
but may be modified by tools like RubyGems to handle versioned data directories.
# File lib/facets/standard/facets/rbconfig.rb, line 32 def self.datadir(package_name) File.join(CONFIG['datadir'], package_name) end
Methodized lookup of config.
# File lib/facets/standard/facets/rbconfig.rb, line 10 def self.method_missing(s,*a,&b) s = s.to_s if CONFIG.key?(s) CONFIG[s] elsif CONFIG.key?(s.upcase) CONFIG[s.upcase] else super(s,*a,&b) end end
# File lib/facets/standard/facets/rbconfig.rb, line 68 def posix? linux? or mac? or bsd? or solaris? or begin fork do end true rescue NotImplementedError, NoMethodError false end end
TODO: who knows what symbian returns?
# File lib/facets/standard/facets/rbconfig.rb, line 63 def symbian? host_os =~ /symbian/ end