Class Ohai::Config
In: lib/ohai/config.rb
Parent: Object
Mixlib::CLI Application System RuntimeError Exec Config Log lib/ohai/config.rb lib/ohai/log.rb lib/ohai/system.rb lib/ohai/application.rb Command Ec2Metadata FromFile Mixin lib/ohai/exception.rb Exceptions Ohai dot/m_140_0.png

Methods

Public Class methods

from chef/config.rb, should maybe be moved to mixlib-config?

[Source]

    # File lib/ohai/config.rb, line 26
26:     def self.platform_specific_path(path)
27:       if RUBY_PLATFORM =~ /mswin|mingw|windows/
28:         # turns /etc/chef/client.rb into C:/chef/client.rb
29:         path = File.join(ENV['SYSTEMDRIVE'], path.split('/')[2..-1])
30:         # ensure all forward slashes are backslashes
31:         path.gsub!(File::SEPARATOR, (File::ALT_SEPARATOR || '\\'))
32:       end
33:       path
34:     end

[Validate]