The block-syntax of new allows you to initialize the individual array elements, optionally based on the index number. In your case, the index is not used, but all 7 array elements are initialized with a nested array of also 7 elements, so you get a 7x7 "matrix".
To illustrate:
$ irb
irb(main):001:0> Array.new(7)
=> [nil, nil, nil, nil, nil, nil, nil]
$ irb
irb(main):001:0> require 'pp'
=> true
irb(main):002:0> pp Array.new(7) {Array.new(7)}
[[nil, nil, nil, nil, nil, nil, nil],
[nil, nil, nil, nil, nil, nil, nil],
[nil, nil, nil, nil, nil, nil, nil],
[nil, nil, nil, nil, nil, nil, nil],
[nil, nil, nil, nil, nil, nil, nil],
[nil, nil, nil, nil, nil, nil, nil],
[nil, nil, nil, nil, nil, nil, nil]]
...In the last form, an array of the given size is created. Each element in this array is created by passing the element’s index to the given block and storing the return value.- what it means is that when you access any index of@board, it will be an array of 7 elements - yes its a way to create a 2D array.