add VarSet#include?

This commit is contained in:
josh committed 2014-03-27 10:39:46 -04:00
1 parent b2c970c9ca
commit cbd5816b4b
2 files changed
+26 -7

No files matched your search

+9 -1
View File
@@ -17,17 +17,25 @@ module Rscons
# Access the value of variable as a particular type
# @param key [String, Symbol] The variable name.
# @return [Object] The variable's value.
def [](key)
@vars[key]
end
# Assign a value to a variable.
# @param key [String, Symbol] The variable name.
# @param val [Object] The value.
# @param val [Object] The value to set.
def []=(key, val)
@vars[key] = val
end
# Check if the VarSet contains a variable.
# @param key [String, Symbol] The variable name.
# @return [true, false] Whether the VarSet contains a variable.
def include?(key)
@vars.include?(key)
end
# Add or overwrite a set of variables
# @param values [VarSet, Hash] New set of variables.
def append(values)