class Rubocop::Cop::Style::DotPosition

This cop checks the . position in multi-line method calls.

Constants

MSG

Public Instance Methods

on_send(node) click to toggle source
Calls superclass method
# File lib/rubocop/cop/style/dot_position.rb, line 10
def on_send(node)
  return unless node.loc.dot

  dot_line = node.loc.dot.line
  selector_line = node.loc.selector.line

  if dot_line != selector_line
    add_offence(:convention, node.loc.dot, MSG)
  end

  super
end