Guest User

Untitled

a guest
Feb 21st, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. def errortraductor(atributo)
  2. #usar el objeto para identificar la clase y asi hacer un if clase
  3. #mirar si es posible meter aca una clases para poder asi usar multiples funciones con esto
  4.  
  5. x = atributo.split
  6. b = x[0]
  7. case b
  8. when "Strnombres"
  9. "nombres" + "=>" + atributo[b[0].size,100]
  10. when "Strapellidos"
  11. "apellidos" + "=>" + atributo[b[0].size,100]
  12. when "Strid"
  13. "ID" + "=>" + atributo[b.size,100]
  14. when "Stremail"
  15. "e-mail" + "=>" + atributo[b.size,100]
  16. when "Inttipo"
  17. "tipo" + "=>" + atributo[b[0].size,100]
  18. when "Strdireccion"
  19. "dirección" + "=>" + atributo[b[0].size,100]
  20. when "Strtelefono"
  21. "teléfono" + "=>" + atributo[b[0].size,100]
  22. when "Strlogin"
  23. "usuario" + "=>" + atributo[b.size,100]
  24. when "Strclave"
  25. "clave" + "=>" + atributo[b[0].size,100]
  26. end
  27. end
Add Comment
Please, Sign In to add comment