# File lib/ohai/system.rb, line 106 def hint?(name) @json_parser ||= Yajl::Parser.new return @hints[name] if @hints[name] Ohai::Config[:hints_path].each do |path| filename = File.join(path, "#{name}.json") if File.exist?(filename) begin hash = @json_parser.parse(File.read(filename)) @hints[name] = hash || Hash.new # hint should exist because the file did, even if it didn't contain anything rescue Yajl::ParseError => e Ohai::Log.error("Could not parse hint file at #{filename}: #{e.message}") end end end @hints[name] end