title: Assignment Branch Condition size is too high
body: <p>I'm making method that takes multiline string (logs) and writes new strings to array.</p>
  
  <pre><code>def task_2(str)
    result = []
    str.each_line do |x|
      ip = x[/^.* - -/]
      datetime = x[/[\[].*[\]]/]
      address = x[/T .* H/]
      if !ip.nil? &amp;&amp; !datetime.nil? &amp;&amp; !address.nil?
        result &lt;&lt; datetime[1..-2] + ' FROM: ' + ip[0..-4] + 'TO:' + address[1..-3]
      end
    end
    result
  end
  </code></pre>
  
  <p>and I need it to pass rubocop analysis with default configuration, but it gives AbcSize 18.68/15
  And I'm sure that because of <code>if..end</code> statement, but how can I rewrite it?</p>
  
  <p>Log example:</p>
  
  <pre><code>10.6.246.103 - - [23/Apr/2018:20:30:39 +0300] "POST /test/2/messages HTTP/1.1" 200 48 0.0498
  10.6.246.101 - - [23/Apr/2018:20:30:42 +0300] "POST /test/2/run HTTP/1.1" 200 - 0.2277
  </code></pre>