text: // Generated by CoffeeScript 1.9.3
  var RouteCreate, RouteDestroy, RouteIndex, RouteShow, RouteUpdate, Routes,
    extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
    hasProp = {}.hasOwnProperty;
  
  RouteIndex = require('./RouteIndex');
  
  RouteShow = require('./RouteShow');
  
  RouteCreate = require('./RouteCreate');
  
  RouteUpdate = require('./RouteUpdate');
  
  RouteDestroy = require('./RouteDestroy');
  
  Routes = (function(superClass) {
    extend(Routes, superClass);
  
    Routes.prototype.__routes = {};
  
    Routes.prototype.afterAll = function(fn) {
      var handler, obj, path, ref, results, route, type;
      if ((type = typeof fn) !== 'function') {
        throw "afterAll expects function type was <" + type + ">";
      }
      ref = this.__routes;
      results = [];
      for (route in ref) {
        obj = ref[route];
        results.push((function() {
          var results1;
          results1 = [];
          for (path in obj) {
            handler = obj[path];
            results1.push(handler.addAfterHandler(fn));
          }
          return results1;
        })());
      }
      return results;
    };
  
    Routes.prototype.beforeAll = function(fn) {
      var handler, obj, path, ref, results, route, type;
      if ((type = typeof fn) !== 'function') {
        throw "beforeAll expects function type was <" + type + ">";
      }
      ref = this.__routes;
      results = [];
      for (route in ref) {
        obj = ref[route];
        results.push((function() {
          var results1;
          results1 = [];
          for (path in obj) {
            handler = obj[path];
            results1.push(handler.addBeforeHandler(fn));
          }
          return results1;
        })());
      }
      return results;
    };
  
    Routes.prototype.getRoute = function(method, path) {};
  
    function Routes(__adapter) {
      this.__adapter = __adapter;
      if (this.__adapter == null) {
        throw "Routing Adapter not defined.";
      }
    }
  
    Routes.prototype.createRoute = function(method, path, operation) {
      var base;
      if (this.__adapter) {
        ((base = this.__routes)[path] != null ? base[path] : base[path] = {})[method] = typeof Routes[operation] === "function" ? Routes[operation](this.__adapter.responseHandler) : void 0;
        return this.__routes[path][method];
      }
    };
  
    return Routes;
  
  })(Object);
  
  Routes.show = function(callback) {
    return new RouteShow(callback);
  };
  
  Routes.update = function(callback) {
    return new RouteUpdate(callback);
  };
  
  Routes.create = function(callback) {
    return new RouteCreate(callback);
  };
  
  Routes.destroy = function(callback) {
    return new RouteDestroy(callback);
  };
  
  Routes.index = function(callback) {
    return new RouteIndex(callback);
  };
  
  module.exports = Routes;
  