Trait getVariable() method