Skip to content

Instantly share code, notes, and snippets.

@fitomad
Last active October 11, 2016 15:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fitomad/88b84bb8240ddb159418c3e283c0935a to your computer and use it in GitHub Desktop.
Save fitomad/88b84bb8240ddb159418c3e283c0935a to your computer and use it in GitHub Desktop.
import Foundation
public class Team
{
// Nombre del equipo
public var name: String
// Cuando se ha creado
public private(set) var createdAt: Date
public init(named name: String)
{
self.name = name
self.createdAt = Date()
}
}
let desappstreTeam: Team = Team(named: "desappstre {eStudio}")
print(desappstreTeam)
print("------------")
dump(desappstreTeam)
// En la consola de depuración verás algo como esto...
// TempCode.Team
// ------------
// ▿ TempCode.Team #0
// - name: "desappstre {eStudio}"
// ▿ createdAt: 2016-10-11 15:27:28 +0000
// - timeIntervalSinceReferenceDate: 497892448.68738902
//
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment