Skip to content

Instantly share code, notes, and snippets.

@fitomad

fitomad/print-dump.swift

Last active Oct 11, 2016
Embed
What would you like to do?
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