lib/Endpoint.js
function(method) {
    var self = this
    var Operation = _o('./Operation')
    var operation = this[method]

    if (typeof(operation) === 'function') {
      var opFn = operation // setting this to new variable is important for the closure
      operation = o({
        _type: Operation,
        service: function(req, res) {
          return opFn.call(self, req, res)
        }
      })
    } else if (typeof(operation) === 'object') {
      // make into proper Operation object if needed
      if (!(operation instanceof Operation)) {
        // make into instance of Operation
        operation = o(operation, Operation)
      }
    } else {
      throw Error("Operation must be a function or an object. Got unexpected value: " + operation)
    }

    // set it back
    this[method] = operation
    this[method].name = method

    // Lexical convenience
    operation.endpoint = this
  }
function(method) {
    var self = this
    var Operation = _o('./Operation')
    var operation = this[method]

    if (typeof(operation) === 'function') {
      var opFn = operation // setting this to new variable is important for the closure
      operation = o({
        _type: Operation,
        service: function(req, res) {
          return opFn.call(self, req, res)
        }
      })
    } else if (typeof(operation) === 'object') {
      // make into proper Operation object if needed
      if (!(operation instanceof Operation)) {
        // make into instance of Operation
        operation = o(operation, Operation)
      }
    } else {
      throw Error("Operation must be a function or an object. Got unexpected value: " + operation)
    }

    // set it back
    this[method] = operation
    this[method].name = method

    // Lexical convenience
    operation.endpoint = this
  }
***************************************************************************
@method _initializeOperation
@description Initializes a single operation for the specified method. This
method will instantiate the operation if it is not already an
instance of {@link carbond.Operation}.
@property {string} method -- The HTTP method corresponding to the operation
to initialize
@returns {undefined}