Module: Dagraph::HasDirectedAcyclicGraph

Defined in:
lib/dagraph/has_directed_acyclic_graph.rb

Instance Method Summary collapse

Instance Method Details

#has_directed_acyclic_graph(options = {}) ⇒ Object Also known as: has_dag



3
4
5
6
7
8
9
# File 'lib/dagraph/has_directed_acyclic_graph.rb', line 3

def has_directed_acyclic_graph(options = {})
  class_attribute :_dagraph
  self._dagraph = Dagraph::NodeConfig.new(self, **options)
  include Dagraph::NodeModel

  _dagraph.edges_class.is_directed_acyclic_graph_edge _dagraph
end

#is_directed_acyclic_graph_edge(node_config) ⇒ Object



12
13
14
15
16
17
# File 'lib/dagraph/has_directed_acyclic_graph.rb', line 12

def is_directed_acyclic_graph_edge(node_config)
  class_attribute :_dagraph
  self._dagraph = node_config

  include Dagraph::EdgeModel
end