Skip to content

Commit 93430e4

Browse files
committed
Fixed compile error and spelling mistake
1 parent 62c1c3f commit 93430e4

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
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: 2 additions & 2 deletions
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
@@ -13,7 +13,7 @@ protocol HEVSuitMedicalAid {
1313

1414
class HEVSuit : HEVSuitMedicalAid {
1515
func administerMorphine() -> String {
16-
return "Morphine aministered."
16+
return "Morphine administered."
1717
}
1818
}
1919

0 commit comments

Comments
 (0)