Add functionality for invoking methods when eval

Adding functionality for script runners (ops) to invoke a function when
evaluating a script.