51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
# File 'lib/asker/ai/ai.rb', line 51
def exclude_questions
param = Application.instance.config["questions"]["exclude"]
return if param.nil?
tags = param.split(",").each(&:strip!)
input = {d: [], b: [], f: [], i: [], s: [], t: []}
output = {d: [], b: [], f: [], i: [], s: [], t: []}
@questions.each_pair do |key, qlist|
output[key] = qlist.select { |q| string_has_this_tags?(q.name, tags) }
input[key] = @questions[key] - output[key]
end
@questions = input
@excluded_questions = output
end
|