has_attr

Description

has_attr returns true if an instance has an attribute and false otherwise.

Example

p is Person where has_attr(self, 'age')

This declaration will only match people that have a property age defined.

Last updated