Pass a value directly to a class method