Created
May 2, 2017 17:23
-
-
Save dhiraj-das/f841afd5417f9f1499c8589a55c7108a to your computer and use it in GitHub Desktop.
Builder Design Pattern in Swift
This file contains 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 myHouse: House? = nil | |
myHouse = HouseBuilder(noOfRooms: 2) | |
.set(color: .red) | |
.addBalcony() | |
.set(noOfBathrooms: 3) | |
.build() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment