Sha256: 237cd98868ffe20f546c1c4c8818f212ac50e19561b5561b7aa03f6265129432

Contents?: true

Size: 767 Bytes

Versions: 5

Compression:

Stored size: 767 Bytes

Contents

(function(Paloma){

  Paloma._router = new Paloma.Router('/');
  Paloma._controllerFactory = new Paloma.ControllerFactory(Paloma._router);

  //
  // Declare Paloma controllers using this method.
  // Will return a new constructor if the no controller with the passed name
  // is found, else it will just return the current constructor.
  //
  Paloma.controller = function(name){
    return Paloma._controllerFactory.get(name) ||
            Paloma._controllerFactory.make(name);
  };


  Paloma.engine = new Paloma.Engine({factory: Paloma._controllerFactory});


  Paloma.executeHook = function(){
    var $hook = $('.js-paloma-hook:first script:first');

    if ($hook.length == 0){ return; }

    var hook = $hook.html();
    eval(hook);
  };


})(window.Paloma);

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
paloma-4.2.1 vendor/assets/javascripts/paloma/paloma.js
paloma-4.2.0 vendor/assets/javascripts/paloma/paloma.js
paloma-4.1.2 vendor/assets/javascripts/paloma/paloma.js
paloma-4.1.1 vendor/assets/javascripts/paloma/paloma.js
paloma-4.1.0 vendor/assets/javascripts/paloma/paloma.js