Can someone explain this ruby sytax to me? : Can someone explain this code to me? What does the pipeline syntax mean and how it works

    array = [1, 2, 3, 4, 5, 3, 6, 7, 2, 8, 1, 9]

    array.each_with_index.reduce({}) { |hash, (item, index)|
    hash[item] = (hash[item] || []) << index
    hash
    }.select { |key, value|
      value.size > 1
    }