Skip to content

Commit

Permalink
refactor: Juice 구조체, FruitStore 클래스 프로퍼티 접근제어 수정 #1
Browse files Browse the repository at this point in the history
- 프로젝트 진행 시 다른 파일에서 값을 불러올 것이라 예상하여 접근제어 수정
  • Loading branch information
ICS-Asan committed Oct 20, 2021
1 parent b5ce497 commit 7ca7e7a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion JuiceMaker/JuiceMaker/Model/FruitStore.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class FruitStore {
}
}

private var inventory: [Fruit] = [
private(set) var inventory: [Fruit] = [
Fruit(name: .strawberry),
Fruit(name: .banana),
Fruit(name: .pineapple),
Expand Down
4 changes: 2 additions & 2 deletions JuiceMaker/JuiceMaker/Model/JuiceMaker.swift
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import Foundation

struct Juice {
fileprivate var name: JuiceName
fileprivate var count: Int = 0
var name: JuiceName
var count: Int = 0

enum JuiceName {
case strawberryJuice
Expand Down

0 comments on commit 7ca7e7a

Please sign in to comment.