I have tried:
elsif file.grep(/Mode: 1/)
puts "test"
else
puts "test but else"
Codacy is saying this is wrong. Is there a way to improve this? According to Codacy:
unexpected token kELSIF (Using Ruby 2.2 parser; configure using `TargetRubyVersion` parameter, under `AllCops`)
unexpected token kELSE (Using Ruby 2.2 parser; configure using `TargetRubyVersion` parameter, under `AllCops`)