- c1 = self.connections.find {|c| c.end == box1}
- c1.blob = link_element.elements['box1EndAdornments'].attributes['blob']
- c1.crowsfoot = link_element.elements['box1EndAdornments'].attributes['crowsfoot']
- c2 = self.connections.find {|c| c.end == box2}
- c2.blob = link_element.elements['box2EndAdornments'].attributes['blob']
- c2.crowsfoot = link_element.elements['box2EndAdornments'].attributes['crowsfoot']
+ box1.edges << self
+ box2.edges << self unless box1 == box2
+ if box1 == box2
+ c1 = self.connections[0]
+ c2 = self.connections[1]
+ else
+ c1 = self.connections.find {|c| c.end == box1}
+ c2 = self.connections.find {|c| c.end == box2}
+ end
+ c1.blob = link_element.elements['box1EndAdornments'].attributes['blob'].downcase.intern
+ c1.crowsfoot = link_element.elements['box1EndAdornments'].attributes['crowsfoot'].downcase.intern
+ c2.blob = link_element.elements['box2EndAdornments'].attributes['blob'].downcase.intern
+ c2.crowsfoot = link_element.elements['box2EndAdornments'].attributes['crowsfoot'].downcase.intern