Skip to content

Commit

Permalink
refactor: Add Access Modifer
Browse files Browse the repository at this point in the history
클래스 내부의 속성 접근 제한자 설정

issue:#27
  • Loading branch information
youngminshim-de committed Apr 23, 2021
1 parent 1dc0e54 commit 624cf29
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 18 deletions.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,20 @@
import Foundation

struct BanchanListDTO: Codable {
let body: [BanchanListItemDTO]
private let body: [BanchanListItemDTO]
}

extension BanchanListDTO {
struct BanchanListItemDTO: Codable {
let detailHash: String
let image: String
let alt: String
let deliveryType: [String]
let description: String
let title: String
let nPrice: String?
let sPrice: String
let badge: [String]?
private let detailHash: String
private let image: String
private let alt: String
private let deliveryType: [String]
private let description: String
private let title: String
private let nPrice: String?
private let sPrice: String
private let badge: [String]?

func toDomain() -> Banchan {
return .init(detailHash: detailHash, image: image, alt: alt, title: title, description: description, nPrice: nPrice, sPrice: sPrice, badge: badge, deliveryType: deliveryType)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ class BanchanCustomCell: UICollectionViewCell {

static let identifer = "BanchanCustomCell"

override func awakeFromNib() {
super.awakeFromNib()
}

static var nib: UINib {
return UINib(nibName: identifer, bundle: nil)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ class BanchanListViewController: UIViewController {

@IBOutlet weak var banchanCollectionView: BanchanCollectionView!

var viewModel = BanchanListViewModel()
lazy var dataSource = configureDataSource()
var subscriptions = Set<AnyCancellable>()
private var viewModel = BanchanListViewModel()
private lazy var dataSource = configureDataSource()
private var subscriptions = Set<AnyCancellable>()

typealias DataSource = UICollectionViewDiffableDataSource<Section, Banchan>
typealias Snapshot = NSDiffableDataSourceSnapshot<Section, Banchan>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class BanchanListViewModel {
}

@Published var menu: Dictionary<Section, [Banchan]>
var network = NetworkSerivce.shared
private var network = NetworkSerivce.shared

init() {
self.menu = [:]
Expand Down

0 comments on commit 624cf29

Please sign in to comment.