   constructor: ->
     @matches = null
     @methods = null
+    @groups = null
 
     @inPorts =
       in: new noflo.Port 'object'


      # If all pass, forward to OUT; FAIL otherwise
      if success
        @outPorts.out.send data
      else
        @outPorts.fail.send data

exports.getComponent = -> new Match

      @methods ?= []
      @methods.push method.toLowerCase()

    @inPorts.in.on 'connect', =>
      @groups = []
    @inPorts.in.on 'begingroup', (group) =>
      @groups.push group
    @inPorts.in.on 'endgroup', (group) =>
      @groups.pop()
    @inPorts.in.on 'disconnect', =>
      @outPorts.out.disconnect()
      @outPorts.fail.disconnect()

    @inPorts.in.on 'data', (data) =>
      success = true
