Implemented the "init(_: )" initialiser function for the Review+DTOs extension in the Feed framework.
This commit is contained in:
parent
94509e4fa3
commit
0ae7aa85cd
@ -0,0 +1,27 @@
|
||||
//
|
||||
// Review+DTOs.swift
|
||||
// ReviewsFeed
|
||||
//
|
||||
// Created by Javier Cicchelli on 20/03/2024.
|
||||
// Copyright © 2024 Röck+Cöde. All rights reserved.
|
||||
//
|
||||
|
||||
import ReviewsFeedKit
|
||||
|
||||
extension Review {
|
||||
|
||||
// MARK: Initialisers
|
||||
init(_ dto: ReviewsFeedKit.Review) {
|
||||
self = .init(
|
||||
author: dto.author,
|
||||
comment: dto.content,
|
||||
id: dto.id,
|
||||
rating: .init(
|
||||
stars: dto.rating,
|
||||
appVersion: dto.version
|
||||
),
|
||||
title: dto.title
|
||||
)
|
||||
}
|
||||
|
||||
}
|
@ -12,6 +12,7 @@
|
||||
02620B8C2BA89C9A00DE7137 /* FeedListViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02620B8B2BA89C9A00DE7137 /* FeedListViewModel.swift */; };
|
||||
02909E792BAB6B0200710E14 /* FilterOption.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02909E782BAB6B0200710E14 /* FilterOption.swift */; };
|
||||
02909E7B2BAB6D2E00710E14 /* Bundle+Constants.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02909E7A2BAB6D2E00710E14 /* Bundle+Constants.swift */; };
|
||||
02909E7D2BAB7FFE00710E14 /* Review+DTOs.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02909E7C2BAB7FFE00710E14 /* Review+DTOs.swift */; };
|
||||
02DA924E2BAAE3FD00C47985 /* Localizable.xcstrings in Resources */ = {isa = PBXBuildFile; fileRef = 02DA924D2BAAE3FD00C47985 /* Localizable.xcstrings */; };
|
||||
02DC7F9F2BA51793000EEEBE /* ReviewsFeed.h in Headers */ = {isa = PBXBuildFile; fileRef = 02DC7F912BA51793000EEEBE /* ReviewsFeed.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
02DC7FA22BA51793000EEEBE /* ReviewsFeed.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 02DC7F8F2BA51793000EEEBE /* ReviewsFeed.framework */; };
|
||||
@ -56,6 +57,7 @@
|
||||
02620B8B2BA89C9A00DE7137 /* FeedListViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FeedListViewModel.swift; sourceTree = "<group>"; };
|
||||
02909E782BAB6B0200710E14 /* FilterOption.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FilterOption.swift; sourceTree = "<group>"; };
|
||||
02909E7A2BAB6D2E00710E14 /* Bundle+Constants.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Bundle+Constants.swift"; sourceTree = "<group>"; };
|
||||
02909E7C2BAB7FFE00710E14 /* Review+DTOs.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Review+DTOs.swift"; sourceTree = "<group>"; };
|
||||
02DA924D2BAAE3FD00C47985 /* Localizable.xcstrings */ = {isa = PBXFileReference; lastKnownFileType = text.json.xcstrings; path = Localizable.xcstrings; sourceTree = "<group>"; };
|
||||
02DC7F8F2BA51793000EEEBE /* ReviewsFeed.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ReviewsFeed.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
02DC7F912BA51793000EEEBE /* ReviewsFeed.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ReviewsFeed.h; sourceTree = "<group>"; };
|
||||
@ -104,6 +106,7 @@
|
||||
children = (
|
||||
02909E7A2BAB6D2E00710E14 /* Bundle+Constants.swift */,
|
||||
023AC7FB2BAA3EC10027D064 /* Int+Constants.swift */,
|
||||
02909E7C2BAB7FFE00710E14 /* Review+DTOs.swift */,
|
||||
);
|
||||
path = Extensions;
|
||||
sourceTree = "<group>";
|
||||
@ -422,6 +425,7 @@
|
||||
023AC7FC2BAA3EC10027D064 /* Int+Constants.swift in Sources */,
|
||||
02DC7FAC2BA51B4C000EEEBE /* FeedItemViewController.swift in Sources */,
|
||||
02909E7B2BAB6D2E00710E14 /* Bundle+Constants.swift in Sources */,
|
||||
02909E7D2BAB7FFE00710E14 /* Review+DTOs.swift in Sources */,
|
||||
0220ADA32BA90646001E6A9F /* FeedItemCell.swift in Sources */,
|
||||
02DC7FAF2BA51B4C000EEEBE /* Review.swift in Sources */,
|
||||
02DC7FAE2BA51B4C000EEEBE /* FeedListViewController.swift in Sources */,
|
||||
|
Loading…
x
Reference in New Issue
Block a user