RuboCop::Cop
This cop checks for string literal concatenation at the end of a line.
@example
# bad some_str = 'ala' + 'bala' some_str = 'ala' << 'bala' # good some_str = 'ala' \ 'bala'
# File lib/rubocop/cop/style/line_end_concatenation.rb, line 28 def autocorrect(node) @corrections << lambda do |corrector| # replace + with \ corrector.replace(node.loc.selector, '\') end end
# File lib/rubocop/cop/style/line_end_concatenation.rb, line 24 def on_send(node) add_offense(node, :selector) if offending_node?(node) end
[Validate]
Generated with the Darkfish Rdoc Generator 2.