This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| extension CollectionType | |
| { | |
| /** | |
| Construye una cadena de texto con los elementos contenidos | |
| - parameter separator: Un caracter que se emplea para separar los elementos | |
| */ | |
| func descriptionWithSeparator(separator: String) -> String | |
| { | |
| return self.reduce(String()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var mutable_array: [Int] = [ 2, 8, 10, 3, 6, 5, 4, 7, 1, 9] | |
| mutable_array.sortInPlace() | |
| { | |
| let pares: (lhs: Bool, rhs: Bool) = (lhs: ($0 % 2 == 0), rhs: ($1 % 2 == 0)) | |
| switch pares | |
| { | |
| case (true, false): | |
| return false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # El que da los nombre | |
| # | |
| class Oraculo | |
| # Nombre del proyecto | |
| attr_reader :name | |
| # Dominio del sitio web | |
| attr_reader :domain |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # Servicio que da nombre a un proyecto de Xcode | |
| # dependiendo de su tipo. | |
| # | |
| require 'sinatra' | |
| require_relative 'Oraculo' | |
| # | |
| # Antes de procesar cualquier ruta... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # Ejemplo para probar la instalación de Ruby | |
| # | |
| class User | |
| # Constructor | |
| def initialize(name) | |
| @name = name | |
| end |
NewerOlder