I had to do this instead of a normal method as I would otherwise consistently obtain an error from binary_regex(@property), which needs self.extension. This error persisted no matter where I positioned the definition of self.extension. If it is unnecessary, let me know what the alternative is.