Created
March 29, 2020 18:54
-
-
Save pnalvarez/5c230cc124b59e476c004ea4dfb310b5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static func parse(from details: PokemonDetailsEntity) -> PokemonDetailsViewModel { | |
var typeString = "" | |
for type in details.types { | |
typeString.append(contentsOf: "\(type) ") | |
} | |
return PokemonDetailsViewModel(name: details.name, | |
info: " order: \(details.order)\n | |
weight: \(details.weight)\n | |
height: \(details.height)\n base experience: \(details.baseExperience)" | |
, | |
id: details.id, | |
image: URL(string: details.image) , types: typeString, mainMove: details.mainMove) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment