summaryrefslogtreecommitdiff
path: root/lib/chef/node_map.rb
diff options
context:
space:
mode:
authorJohn Keiser <john@johnkeiser.com>2015-05-06 14:07:43 -0700
committerJohn Keiser <john@johnkeiser.com>2015-06-02 09:53:39 -0700
commitfc710c26a95e74aa66bf0bee8923ee104593c97a (patch)
treeb41e2ed1f80fa139d8b9c171b8e11eb4eed82c5f /lib/chef/node_map.rb
parent9028823f7b046c4c081b1cb1df005d61fbfa1db2 (diff)
downloadchef-fc710c26a95e74aa66bf0bee8923ee104593c97a.tar.gz
Narrow resolvers to only look at parts of the map we support
Diffstat (limited to 'lib/chef/node_map.rb')
-rw-r--r--lib/chef/node_map.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/chef/node_map.rb b/lib/chef/node_map.rb
index 7c25cb841a..a7a0389a2a 100644
--- a/lib/chef/node_map.rb
+++ b/lib/chef/node_map.rb
@@ -71,6 +71,13 @@ class Chef
list(node, key).first
end
+ # List all matches for the given node and key from the NodeMap, from
+ # most-recently added to oldest.
+ #
+ # @param node [Chef::Node] The Chef::Node object for the run
+ # @param key [Object] Key to look up
+ # @return [Object] Value
+ #
def list(node, key)
# FIXME: real exception
raise "first argument must be a Chef::Node" unless node.is_a?(Chef::Node)