summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2018-05-17 17:14:35 -0700
committerTim Smith <tsmith@chef.io>2018-05-17 17:14:35 -0700
commit750724985516bc2569afe95044117ade50ff8aab (patch)
tree931ab309f514fe45ab9359c5025c0bb59c7c41ec
parent11ccdb8e42bce384c36b3357b71acb4898c966b2 (diff)
downloadohai-750724985516bc2569afe95044117ade50ff8aab.tar.gz
Document DMI methods
Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r--lib/ohai/common/dmi.rb11
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/ohai/common/dmi.rb b/lib/ohai/common/dmi.rb
index 3403bd93..3316f810 100644
--- a/lib/ohai/common/dmi.rb
+++ b/lib/ohai/common/dmi.rb
@@ -76,7 +76,10 @@ module Ohai
# away some of the less useful IDs
ID_TO_CAPTURE = [ 0, 1, 2, 3, 4, 6, 11 ]
- # return the list of DMI IDs to capture
+ # the whitelisted DMI IDs. This is combination of the defaults + any additional
+ # IDs defined in the :additional_dmi_ids config
+ #
+ # @return [Array] the list of DMI IDs to capture
def whitelisted_ids
if Ohai.config[:additional_dmi_ids]
if [ Integer, Array ].include?(Ohai.config[:additional_dmi_ids].class)
@@ -88,7 +91,11 @@ module Ohai
ID_TO_CAPTURE
end
- # look up DMI ID
+ # the human readable description from a DMI ID
+ #
+ # @param id [String, Integer] the ID to lookup
+ #
+ # @return [String]
def id_lookup(id)
id = id.to_i
if (id >= 128) && (id <= 255)