treesit.el has this comment:

        ;; TODO: Document if genuinely useful.
        (cons 'n-p-gp
            ...

I found it useful:

           ((n-p-gp "}" "hash" "assignment") grand-parent 0)
           ((n-p-gp "pair" "hash" "assignment") grand-parent ruby-ts-mode-indent-offset)

           ((n-p-gp "]" "array" "assignment") grand-parent 0)
           ((n-p-gp ".*" "array" "assignment") grand-parent ruby-ts-mode-indent-offset)

Produces:

array = [
  9.9,
  10,
  11,
]

new_hash = {
  frog: 12,
  daft: 92,
  egg: 99
}