Slide 84
Slide 84 text
&NVMBUJPOPG3VCP$PQ
% rubocop example.rb --only Lint/ErbNewArguments
Inspecting 1 file
W
Offenses:
example.rb:3:15: W: Lint/ErbNewArguments: Passing safe_level with
the 2nd argument of ERB.new is deprecated. Do not use it, and
specify other arguments as keyword arguments.
ERB.new('hi', nil, '-', '@output_buffer')
^^^
example.rb:3:20: W: Lint/ErbNewArguments: Passing trim_mode with
the 3rd argument of ERB.new is deprecated. Use keyword argument
like ERB.new(str, trim_mode: '-') instead.
ERB.new('hi', nil, '-', '@output_buffer')
^^^
example.rb:3:25: W: Lint/ErbNewArguments: Passing eoutvar with the
4th argument of ERB.new is deprecated. Use keyword argument like
ERB.new(str, eoutvar: '@output_buffer') instead.
ERB.new('hi', nil, '-', '@output_buffer')
^^^^^^^^^^^^^^^^