Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 10 additions & 11 deletions README-ko-KR.md
Original file line number Diff line number Diff line change
Expand Up @@ -266,23 +266,22 @@ protocol TimeTraveling {
}

final class DeLorean: TimeTraveling {
func travelInTime(time: TimeInterval) -> String {
return "Used Flux Capacitor and travelled in time by: \(time)s"
}
func travelInTime(time: TimeInterval) -> String {
return "Used Flux Capacitor and travelled in time by: \(time)s"
}
}

final class EmmettBrown {
private let timeMachine: TimeTraveling

private let timeMachine: TimeTraveling

// ⚠️ Emmet Brown은 `DeLorean`을 구체적인 클래스인 `DeLorean`이 아닌, `TimeTraveling` 장치로 받는다.
init(timeMachine: TimeTraveling) {
self.timeMachine = timeMachine
}
init(timeMachine: TimeTraveling) {
self.timeMachine = timeMachine
}

func travelInTime(time: TimeInterval) -> String {
return timeMachine.travelInTime(time: time)
}
func travelInTime(time: TimeInterval) -> String {
return timeMachine.travelInTime(time: time)
}
}

let timeMachine = DeLorean()
Expand Down
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -274,22 +274,22 @@ protocol TimeTraveling {
}

final class DeLorean: TimeTraveling {
func travelInTime(time: TimeInterval) -> String {
return "Used Flux Capacitor and travelled in time by: \(time)s"
}
func travelInTime(time: TimeInterval) -> String {
return "Used Flux Capacitor and travelled in time by: \(time)s"
}
}

final class EmmettBrown {
private let timeMachine: TimeTraveling
private let timeMachine: TimeTraveling

// ⚠️ Emmet Brown is given a `TimeTraveling` device, not the concrete class `DeLorean`!
init(timeMachine: TimeTraveling) {
self.timeMachine = timeMachine
}
init(timeMachine: TimeTraveling) {
self.timeMachine = timeMachine
}

func travelInTime(time: TimeInterval) -> String {
return timeMachine.travelInTime(time: time)
}
func travelInTime(time: TimeInterval) -> String {
return timeMachine.travelInTime(time: time)
}
}

let timeMachine = DeLorean()
Expand Down