Add Rscons::VarSet#values_at - close #45

This commit is contained in:
josh committed 2017-08-03 15:54:24 -04:00
1 parent 89562c584a
commit 099d26f33c
2 files changed
+22

No files matched your search

+13
View File
@@ -143,6 +143,19 @@ module Rscons
end
end
# Return an array containing the values associated with the given keys.
#
# @param keys [Array<String, Symbol>]
# Keys to look up in the VarSet.
#
# @return [Array]
# An array containing the values associated with the given keys.
def values_at(*keys)
keys.map do |key|
self[key]
end
end
private
# Move all VarSet variables into the copy-on-access list.