class RuboCop::Cop::Lint::ReturnInVoidContext

Checks for the use of a return with a value in a context where the value will be ignored. (initialize and setter methods)

@example

# bad
def initialize
  foo
  return :qux if bar?
  baz
end

def foo=(bar)
  return 42
end

# good
def initialize
  foo
  return if bar?
  baz
end

def foo=(bar)
  return
end