       @satisfied = no
       @emit 'Canceled'
 
-  class Gate extends KDObject
-
-    makeError = (message, brand) ->
-      { stack } = new Error
-      {
-        message, brand, stack
-      }
-
-    constructor: (@brand, fields = []) ->
-      unless @brand in ['any', 'all']
-        throw makeError 'Unrecognized brand!', @brand
-
+  @Gate = class Gate extends KDObject
+
+    constructor: (fields = []) ->
       super()
 
       @id = @createId()


    defineKey: (key, value) ->
      @data[key] = value
      @satisfyRequirement key

  class Satisfier extends KDEventEmitter


      return this

    removeChild: (child) ->
      @children.splice i, 0  while (i = @children.indexOf child) > -1
      return this

    addField: (field) ->
      satisfier = @createSatisfier()
      
      @fields[field] = satisfier

      if field.isGate

        @addChild field
        
        field.on 'report', (state) => switch state
          when 'Satisfied'
            @emit 'RequirementSatisfied', field
            satisfier.satisfy()
          when 'Canceled'
            satisfier.cancel()

      return this

