Module: ActsAsGraphDiagram::Node::ClassMethods

Defined in:
lib/acts_as_graph_diagram/node.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#acts_as_nodeObject



12
13
14
15
16
17
18
19
20
21
# File 'lib/acts_as_graph_diagram/node.rb', line 12

def acts_as_node
  has_many :behinds, as: :destination,
                     class_name: 'Edge',
                     dependent: :destroy
  has_many :aheads, as: :departure,
                    class_name: 'Edge',
                    dependent: :destroy
  include ActsAsGraphDiagram::Node::InstanceMethods
  include ActsAsGraphDiagram::Node::GraphCalculator
end