Created
March 11, 2016 14:16
-
-
Save ivanbruel/a581668425d38160d118 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
class AnimalViewModel { | |
let name: String | |
let image: UIImage | |
private let _hungry: Variable<Bool> | |
var hungry: Observable<Bool> { | |
return _hungry.asObservable() | |
} | |
init(animal: Animal) { | |
name = animal.name | |
image = animal.image | |
_hungry = Variable(false) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment