- def obtain_error_messages_by_error_id(error_id, return_error_line = false) error_messages_by_error_id = [] error_messages = obtain_error_messages error_messages.each do |k, v| if ('build-pkg.' + build_pkg_error_id(k)) == error_id
error_messages_by_error_id += v.to_a
if return_error_line
error_messages_by_error_id << k
else
error_messages_by_error_id += v.to_a
end
above if-else => error_messages_by_error_id += return_error_line ? [k] : v.to_a
Thanks, Luan Shengde
end end error_messages_by_error_id
-- 2.23.0