Skip to content

Instantly share code, notes, and snippets.

@wolfmcnally
Last active July 2, 2017 02:06
Show Gist options
  • Save wolfmcnally/053b7e5f2d0a79daf83b14c32dc24beb to your computer and use it in GitHub Desktop.
Save wolfmcnally/053b7e5f2d0a79daf83b14c32dc24beb to your computer and use it in GitHub Desktop.
Test Gist for Swift
import WolfCore
public class Foo {
let count
let name
public init(count: Int, name: String) {
self.count = count
self.name = name
}
}
extension Foo: CustomStringConvertible {
public var description: String {
print("I see \(count) \(name).")
}
}
func test() {
let foo = Foo(count: 3, name: "giraffe")
print(foo) // prints "I see 3 giraffe.")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment