Skip to content

Instantly share code, notes, and snippets.

@thexande
Last active December 16, 2018 04:45
Show Gist options
  • Save thexande/2826023dd61f131bc4cfb72b2eb47874 to your computer and use it in GitHub Desktop.
Save thexande/2826023dd61f131bc4cfb72b2eb47874 to your computer and use it in GitHub Desktop.
public enum World {
public enum StoreError: Error {
case parsing
case network
}
public struct CountryLite: Hashable {
public let code: String
public let name: String
public let emoji: String
}
public struct CountryDetail: Hashable {
public struct Language: Hashable {
public let name: String
public init(name: String) {
self.name = name
}
}
public struct Continent: Hashable {
public let name: String
public init(name: String) {
self.name = name
}
}
public let code: String
public let name: String
public let currency: String
public let phone: String
public let emoji: String
public let languages: [Language]
public let continent: Continent
public init(code: String,
name: String,
currency: String,
phone: String,
emoji: String,
languages: [Language],
continent: Continent) {
self.code = code
self.name = name
self.currency = currency
self.phone = phone
self.emoji = emoji
self.languages = languages
self.continent = continent
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment