Skip to content

Commit 513ea1d

Browse files
codethoughtexpdorriss
authored andcommitted
Fixed compile error and spelling mistake
1 parent b6e4877 commit 513ea1d

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

source/structural/composite.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ Component
1212
protocol Shape {
1313
func draw(fillColor: String)
1414
}
15-
/*:
15+
/*:
1616
Leafs
17-
*/
17+
*/
1818
final class Square : Shape {
1919
func draw(fillColor: String) {
2020
print("Drawing a Square with color \(fillColor)")
@@ -32,11 +32,11 @@ Composite
3232
*/
3333
final class Whiteboard : Shape {
3434
lazy var shapes = [Shape]()
35-
35+
3636
init(_ shapes:Shape...) {
3737
self.shapes = shapes
3838
}
39-
39+
4040
func draw(fillColor: String) {
4141
for shape in self.shapes {
4242
shape.draw(fillColor: fillColor)
@@ -47,4 +47,4 @@ final class Whiteboard : Shape {
4747
### Usage:
4848
*/
4949
var whiteboard = Whiteboard(Circle(), Square())
50-
whiteboard.draw("Red")
50+
whiteboard.draw(fillColor: "Red")

source/structural/virtual_proxy.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
🍬 Virtual Proxy
33
----------------
44

5-
The proxy pattern is used to provide a surrogate or placeholder object, which references an underlying object.
5+
The proxy pattern is used to provide a surrogate or placeholder object, which references an underlying object.
66
Virtual proxy is used for loading object on demand.
77

88
### Example

0 commit comments

Comments
 (0)