// Generated by CoffeeScript 1.7.1
(function() {
  var exports, utils, _,
    __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };

  _ = require('underscore');

  utils = {};

  utils.routeMethods = ['index', 'detail', 'put', 'delete'];

  utils.endsWithMethod = function(path) {
    var pathParts, _ref;
    pathParts = path.split(/\//);
    return _ref = pathParts[pathParts.length - 1], __indexOf.call(utils.routeMethods, _ref) >= 0;
  };

  utils.endsWith = function(path, method) {
    var pathParts;
    pathParts = path.split(/\//);
    return pathParts[pathParts.length - 1] === method;
  };

  exports = module.exports = utils;

}).call(this);
