Created
June 5, 2019 14:57
-
-
Save rtking1993/0961143d63c39ea7488405cd371e843a to your computer and use it in GitHub Desktop.
Constants file containing hardcoded animals for Safari Animals
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
// MARK: - Animal Constants | |
extension Animal { | |
static let all: [Animal] = [.lion, .elephant, .giraffe, .zebra] | |
static let lion = Animal(id: 1, name: "Lion", | |
description: "Biggest cat in Africa, the king of the jungle.", | |
imageName: "lion") | |
static let elephant = Animal(id: 2, name: "Elephant", | |
description: "Huge plant eating animal with long nose.", | |
imageName: "elephant") | |
static let giraffe = Animal(id: 3, name: "Giraffe", | |
description: "Like a cow with a very long neck.", | |
imageName: "giraffe") | |
static let zebra = Animal(id: 4, name: "Zebra", | |
description: "A horse with black and white stripes.", | |
imageName: "zebra") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment