Sha256: 1de0a68337bfc47ddfa6e841596d6aa69ba3ee6147b0af3b67122315fb635e36
Contents?: true
Size: 343 Bytes
Versions: 1
Compression:
Stored size: 343 Bytes
Contents
module Census class Search def initialize(options) @options = options end def perform results = [] @options.each_pair do |question, value| users = question.find_answers_matching(value).map(&:user) results = results.empty? ? users : results & users end results end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
census-0.3.0 | lib/census/search.rb |