private void LerArquivo(Editor editor)
 {
     using (var textReader = new StreamReader(ObterArquivo()))
     {
         editor.CodigoEmRuby = textReader.ReadToEnd();
         textReader.Close();
     }
 }
 private void SalvarArquivo(Editor editor)
 {
     using (var textWriter = new StreamWriter(ObterArquivo()))
     {
         textWriter.Write(editor.CodigoEmRuby);
         textWriter.Close();
     }
 }
        public ActionResult EditorRuby(string button, Editor editor)
        {
            if (button == "Alterar")
                SalvarArquivo(editor);
            else
                LerArquivo(editor);

            return View(editor);
        }