Class: Utilidades
- Inherits:
-
Object
- Object
- Utilidades
- Defined in:
- lib/utilidades.rb
Overview
/****************************************************************************/ /* clase Utilidades */ /* */ /* Clase con funcionalidades generales */ /****************************************************************************/ /*
Version: 1.0 en ruby 1.8.x
Fecha : 18 de Abril 2008
Autor : Prof. Edgar Gonzalez
Email : [email protected]
*/
Instance Method Summary collapse
- #getNombreArchivo(archivo) ⇒ Object
-
#initialize ⇒ Utilidades
constructor
A new instance of Utilidades.
Constructor Details
#initialize ⇒ Utilidades
Returns a new instance of Utilidades.
14 15 |
# File 'lib/utilidades.rb', line 14 def initialize() end |
Instance Method Details
#getNombreArchivo(archivo) ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/utilidades.rb', line 16 def getNombreArchivo(archivo) nombrearchivo = "" r=archivo.to_s.size() while r>=0 if archivo.to_s[r,1] != "/" nombrearchivo = archivo.to_s[r,1] + nombrearchivo else r=0 end r=r-1 end return nombrearchivo end |