Your member function does indeed exist, but it's not getting picked up by ExposeClassToUnit
, because it doesn't read functions.
From the comment just above the implementation of TdwsUnit.ExposeClassToUnit
:
AClass is the class to expose to the unit. All published properties of standard
simple datatypes that are supported in DWS will be exposed that were introduced
between AAncestor and AClass.
So it only picks up properties, not functions, and only ones whose access level is published.