Sha256: af20dd7f241bd3435cac8387e2f2c3748bc0c298e6983e0539df5423cd57fc67
Contents?: true
Size: 241 Bytes
Versions: 6
Compression:
Stored size: 241 Bytes
Contents
module MWO::CollectionUtils def filter(options = {}) filtered = self.find_all do |element| matches = options.find_all do |k,v| element.send(k) == options[k] end !matches.empty? end filtered end end
Version data entries
6 entries across 6 versions & 1 rubygems