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/rbconfig.rb, line 32 def self.datadir(package_name) File.join(CONFIG['datadir'], package_name) end
# File lib/facets/rbconfig.rb, line 38 def self.host_os CONFIG['host_os'] end
# File lib/facets/rbconfig.rb, line 42 def linux? host_os =~ /linux|cygwin/ end
# File lib/facets/rbconfig.rb, line 46 def mac? host_os =~ /mac|darwin/ end
# File lib/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
# File lib/facets/rbconfig.rb, line 58 def solaris? host_os =~ /solaris|sunos/ end
Generated with the Darkfish Rdoc Generator 2.