xjdpjg
Last Updated: February 25, 2016
·
931
· jbowles

RbConfig is nice

ruby 1.9.3 RbConfig module makes getting system info nice!

File.join(*RbConfig::CONFIG.valuesat('bindir','RUBYINSTALLNAME'))
datadir = RbConfig::CONFIG['datadir']
os = RbConfig::CONFIG['host
os']

And more:
rbconfig = File.join(*RbConfig::CONFIG.keys)