Revision 2c35cfa1
Added by Marc Dequènes almost 14 years ago
- ID 2c35cfa16d5c749a56848090fdc4af7697c45a44
lib/cyborghood/cyborg/botnet/interface.rb | ||
---|---|---|
|
||
def hash_match_criterias(hash, crit)
|
||
crit.each do |key, wanted_value|
|
||
# force cast to string in case of a composite object
|
||
value = hash[key].to_s
|
||
value = hash[key]
|
||
|
||
if wanted_value.is_a? Array
|
||
return false unless wanted_value.include?(value)
|
Also available in: Unified diff
[fix] Botnet/Interface: removed silly String cast when searching nodes