class RuboCop::Cop::Layout::MultilineAssignmentLayout

Checks whether the multiline assignments have a newline after the assignment operator.

@example EnforcedStyle: new_line (default)

# bad
foo = if expression
  'bar'
end

# good
foo =
  if expression
    'bar'
  end

# good
foo =
  begin
    compute
  rescue => e
    nil
  end

@example EnforcedStyle: same_line

# good
foo = if expression
  'bar'
end

@example SupportedTypes: [‘block’, ‘case’, ‘class’, ‘if’, ‘kwbegin’, ‘module’] (default)

# good
foo =
  if expression
    'bar'
  end

# good
foo =
  [1].map do |i|
    i + 1
  end

@example SupportedTypes: [‘block’]

# good
foo = if expression
  'bar'
end

# good
foo =
  [1].map do |i|
    'bar' * i
  end