Class: Dag::Polymorphic::Sink

Inherits:
EndPoint
  • Object
show all
Defined in:
lib/dag/polymorphic.rb

Overview

Encapsulates information about the sink (destination) of a link

Instance Attribute Summary

Attributes inherited from EndPoint

#id, #type

Class Method Summary collapse

Methods inherited from EndPoint

from, from_resource, #initialize, #matches?

Constructor Details

This class inherits a constructor from Dag::Polymorphic::EndPoint

Class Method Details

.from_edge(edge) ⇒ Object

Factory Construction method that generates a sink from a link



48
49
50
# File 'lib/dag/polymorphic.rb', line 48

def self.from_edge(edge)
  self.new(edge.descendant_id, edge.descendant_type)
end