blob: 9db156be22af85bd3d0eed7303243a1870e416c7 [file] [log] [blame]
/*
* weinre is available under *either* the terms of the modified BSD license *or* the
* MIT License (2008). See http://opensource.org/licenses/alphabetical for full text.
*
* Copyright (c) 2010, 2011 IBM Corporation
*/
requireClass ./Ex
//-----------------------------------------------------------------------------
class Binding(receiver, method)
if (receiver == null) throw new Ex(arguments, "receiver argument for Binding constructor was null")
if (typeof(method) == "string") method = receiver[method]
if (typeof(method) != "function") throw new Ex(arguments, "method argument didn't specify a function")
return function() {
return method.apply(receiver, [].slice.call(arguments))
}