has_attr returns true if an instance has an attribute and false otherwise.
has_attr
p is Person where has_attr(self, 'age')
This declaration will only match people that have a property age defined.
Last updated 4 years ago
Was this helpful?