 
     return sheet.join('')
 
-  getSelector: (operation) ->
-    return @getSelectors(operation).join(', ')
-
-  getSelectors: (operation) ->
+  getSelector: (stylesheet, operation) ->
+    return @getSelectors(stylesheet, operation).join(', ')
+
+  getSelectors: (stylesheet, operation) ->
     parent = operation
     results = wrapped = custom = undefined
 

        sheet.deleteRule(previous.length)
    else
      body = property + ':' + value
      selectors = @getSelector(operation)
      index = sheet.insertRule(selectors + "{" + body + "}", previous.length)
    return true


      
      # Add rule selector to path
      else if parent.command.type == 'Iterator'
        # Prepend selectors with selectors of a parent rule
        results = @combineSelectors(results, parent[1])

      if !(parent = parent.parent) && stylesheet?.selectors
        results = @combineSelectors(results,  stylesheet)

    return results

  empty: ['']

  combineSelectors: (results = @empty, operation) ->
    update = []
    for result, index in results
      if operation.selectors
        if result.substring(0, 12) == ' [matches~="'
          update.push ' ' + @getCustomSelector(result.selector, result)
        else
          for selector in operation.selectors
            update.push selector + result
      else if result.substring(0, 12) == ' [matches~="'
        update.push ' ' + @getCustomSelector(operation.command.path, result)
      else if operation[0] == ','
        for index in [1 ... operation.length] by 1
          update.push @getRuleSelector(operation[index], operation.command) + result 
      else 
        update.push @getRuleSelector(operation) + result
    return update


  getRuleSelector: (operation, parent) ->
    command = operation.command
