Method: Chef::NodeMap#list
- Defined in:
- lib/chef/node_map.rb
#list(node, key) ⇒ Object
List all matches for the given node and key from the NodeMap, from most-recently added to oldest.
141 142 143 144 145 146 147 |
# File 'lib/chef/node_map.rb', line 141 def list(node, key) return [] unless map.key?(key) map[key].select do |matcher| node_matches?(node, matcher) end.map { |matcher| matcher[:klass] } end |