Project Euler #5 in Ruby with Prime class
Shortening

Building arrays by concatenating results to an empty list is inelegant.  You should strive to define the result "all at once":

a = (2..20).flat_map { |n| Prime.prime_division(n) }


Usually, one-blocks should be written using { … }.  Use do … end if it spans multiple lines.

In the second half, n[0] should always be a prime number, so I don't see why it would ever be 0 or nil.  Therefore, you could finish up by writing

puts a.uniq.map { |prime, power| prime }.inject(:*)


Refining

To find the maximum power of each prime, use Enumerable#group_by.

require 'prime'

puts (2..20).flat_map { |n| Prime.prime_division(n) }
            .group_by { |prime, power| prime }.values
            .map { |factors| factors.max_by { |prime, power| power } }
            .map { |prime, power| prime ** power }
            .inject(:*)