Skip to content

Commit

Permalink
~Minor improvement.
Browse files Browse the repository at this point in the history
  • Loading branch information
ochococo committed Sep 26, 2014
1 parent f5480e0 commit 7ccca81
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Binary file modified Design-Patterns.playground.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion Design-Patterns.playground/section-24.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class Circle : Shape {
class Whiteboard : Shape {
lazy var shapes = [Shape]()

init(_ shapes:[Shape]) {
init(_ shapes:Shape...) {
self.shapes = shapes
}

Expand Down
2 changes: 1 addition & 1 deletion Design-Patterns.playground/section-26.swift
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
var whiteboard = Whiteboard([Circle(), Square()])
var whiteboard = Whiteboard(Circle(), Square())
whiteboard.draw("Red")
4 changes: 2 additions & 2 deletions README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ class Circle : Shape {
class Whiteboard : Shape {
lazy var shapes = [Shape]()

init(_ shapes:[Shape]) {
init(_ shapes:Shape...) {
self.shapes = shapes
}

Expand All @@ -257,7 +257,7 @@ class Whiteboard : Shape {
```
**Usage:**
```swift
var whiteboard = Whiteboard([Circle(), Square()])
var whiteboard = Whiteboard(Circle(), Square())
whiteboard.draw("Red")
```

Expand Down

0 comments on commit 7ccca81

Please sign in to comment.