and = Ember.computed.and;
equal = Ember.computed.equal;
bool = Ember.computed.bool;
Ember.Object.extend({
isHeirToCasterlyRock: and(equal('lastName', 'Lannister'),
bool('isEldestSon')), // Primogeniture is actually
// more complicated but w/e
isCersei: and(equal('lastName', 'Lannister'),
equal('gender', 'female'))
})
There will actually be two implicit computed properties for
equal('lastName', 'Lannister')
although in principle this could be optimised
to only one (and if people did this manually they would have only one property:
isLannister
).