Support Ruby Proc as JS callback type