Last active
July 2, 2017 02:06
-
-
Save wolfmcnally/053b7e5f2d0a79daf83b14c32dc24beb to your computer and use it in GitHub Desktop.
Test Gist for Swift
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
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