   constructor: (@ports, @ip, @nodeInstance, @port, @result) ->
     @scope = @ip.scope
 
+  # Sets component state to `activated`
   activate: ->
     @result.__resolved = false
     if @nodeInstance.ordered
       @nodeInstance.outputQ.push @result
 
-  has: ->
+  # Returns true if a port (or ports joined by logical AND) has a new IP
+  has: (port = 'in') ->
     res = true
     res and= @ports[port].ready @scope for port in arguments
     res
 
-  get: ->
+  # Fetches IP object(s) for port(s)
+  get: (port = 'in') ->
     if @nodeInstance.ordered and
     @nodeInstance.activateOnInput and
     not ('__resolved' of @result)

    else
      @nodeInstance.outPorts[port].sendIP ip

  send: (outputMap) ->
    if @nodeInstance.ordered and
    not ('__resolved' of @result)

  constructor: (@ports, @ip, @nodeInstance, @result) ->
    @scope = @ip.scope

  # Sets component state to `activated`
  activate: ->
    @result.__resolved = false
    if @nodeInstance.ordered
      @nodeInstance.outputQ.push @result

  # Checks if a value is an Error
  isError: (err) ->
    err instanceof Error or
    Array.isArray(err) and err.length > 0 and err[0] instanceof Error

  # Sends an error object
  error: (err) ->
    multiple = Array.isArray err
    err = [err] unless multiple
