title: how to make these four ruby code into one line?
body: <p>I want to make these four ruby line into one line to change an IP to his network.
  such as "10.10.102.123"=>"10.10.102.0/24"</p>
  
  <p>I use the way below,but I hope to find a more clean way better in one line.</p>
  
  <pre><code>network = "10.10.102.123"
  network = network.split('.')
  network[3] = '0/24'
  xx  = network.join('.')  
  </code></pre>
  
  <p>Thanks for your help.</p>