 # requested, it emits the function source code as a string and if
 # requested - optionally emits stringified application construct
 # around it. This is used to remote execute functions on the site.
-module.exports.Executable = class Executable extends events.EventEmitter
+module.exports.Executable = class Executable extends Remotable
 
     # A public constructor that takes the executable for a function
     # object. Beware, this must be a singular, simple function, not
     # a constructor, not a bound method. It must not have any sort
     # of dependencies, because it will executed in different place.
-    constructor: (@executable) ->
+    constructor: (executable) -> @sourcing executable
 
     # Generation of string representation of the function invocation
     # in JavaScript, so that it can be executed remotely on site. An

SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
###

_ = require "lodash"
uuid = require "node-uuid"
asciify = require "asciify"
connect = require "connect"

    # only a set of arguments that must be scalars or similar to them.
    # This method does not do any processing of args, inserts raws.
    unprocessed: (parameters...) ->
        detected = _.isFunction @sourcing()
        passed = -> @sourcing().length is 0
        objectable = "No valid objectable has been set"
        wrapping = "The wrapper must not have arguments"
        throw new Error objectable unless detected
        throw new Error wrapping unless passed()
        joined = parameters.join(", ").toString()
        stringified = @sourcing().toString()
        "new ((#{stringified})()) (#{joined})"

    # Generation of string representation of the object instantiation
