How to get subnet in CIDR form from erb template

Dear Community,

Can some explain how to get subnet in cidr from via erb template to a file in foreman 3.x

Expected outcome:
I want to have outcome like 192.168.24.0/24 in a file from erb template

Thanks

It’s @host.subnet.cidr

LZ