def connect_via(edge)
      connect_endpoint(@in_edges, edge)  if edge.to   == self
      connect_endpoint(@out_edges, edge) if edge.from == self

      edge
    end
def connect_via(edge)
      connect_endpoint(@in_edges, edge)  if edge.to   == self
      connect_endpoint(@out_edges, edge) if edge.from == self

      edge
    end
Internal: Given an Edge, establishes the connection for this node.

 Please note that you need to call +connect_via+ on both the "from" and
 "to" nodes. Unless you need to create the connection using a subclass of
 Edge, you will likey prefer using the simpler +connect_to+.

 Example:

   phil  = Turbine::Node.new(:phil)
   haley = Turbine::Node.new(:haley)

   edge  = Turbine::Edge.new(phil, haley, :child)

   # Adds an link from "phil" to "haley".
   phil.connect_via(edge)
   haley.connect_via(edge)

 Raises a Turbine::CannotConnectError if this node is not the +from+ or
 +to+ node specified by the edge.

 Returns the given edge.