Sha256: a573b9ce891ae90589e27c283b4ce3e50154cee068513f2b6fe6b9b6a7fbfd7e

Contents?: true

Size: 1.29 KB

Versions: 1

Compression:

Stored size: 1.29 KB

Contents

var
    Flyweight;


(function($) {
    "use strict";


    try {

        Object.defineProperties($.prototype, {
            buildConstructor: {
                value: function(args) {
                    // this won't be more necessary with Ecam Script 6
                    if (!(args instanceof Array)) {
                        args = Array.from(args);
                    }

                    // "bind" is a instance method of Function. It creates a new
                    // function for be called after.
                    // Apply calls the bind method
                    return $.prototype.bind.apply(this, [null].concat(args)
                                                  .flatten());
                }
            },

            functionalSingleton: {
                value: function() {
                    // delegator = Delegator.apply(this);
                    // delegator.object(Singleton.new);
                    return Flyweight.Factory.new.apply(this, Array
                                                       .from(arguments));
                }
            },

            implementsMethods: {
                value: function(name) {
                    return Object.implementsMethods(this, name);
                }
            }

        });

    } catch(e) {}

})(Function);

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
esphinx-rails-1.1.2 lib/assets/javascripts/esphinx/lib/extensions/function.js