Skip to content

Instantly share code, notes, and snippets.

@hesher
Created June 7, 2017 06:28
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 hesher/fc9748ca8a585e7992cd8117557a88eb to your computer and use it in GitHub Desktop.
Save hesher/fc9748ca8a585e7992cd8117557a88eb to your computer and use it in GitHub Desktop.
class SiteBuilder {
private site: any;
withSiteName(name: string) {
this.site.name = name;
return this;
}
withDomain(domain: string) {
this.site.domain = domain;
return this;
}
build() {
return this.site;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment