Auto indent like ruby-mode.el on emacs.

Select sources that is no indent like below, try [Ruby]-[IndentCommand(Ctrl+B)].

class A
def m1
"here in m1"
end
def m2
"here in m2"
end
end

Input the below sample source manually by using [Ruby]-[IndentReturnIndent(Ctrl+M)] instead of [Enter] key.

def m3(a, b)
  if (a ==
      b)
    "equal"
  else
    "different"
  end
end