Skip to content

Instantly share code, notes, and snippets.

@rtking1993
Created June 5, 2019 14:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rtking1993/0961143d63c39ea7488405cd371e843a to your computer and use it in GitHub Desktop.
Save rtking1993/0961143d63c39ea7488405cd371e843a to your computer and use it in GitHub Desktop.
Constants file containing hardcoded animals for Safari Animals
// 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