Module: ActsAsGraph::ClassMethods

Defined in:
lib/acts_as_graph.rb

Instance Method Summary collapse

Instance Method Details

#acts_as_graph(children: nil) ⇒ Object



11
12
13
14
15
16
17
# File 'lib/acts_as_graph.rb', line 11

def acts_as_graph children: nil
  @children_method_name = children

  define_method "descendant_#{children}" do
    descendant_vertices
  end
end

#children_method_nameObject



19
20
21
# File 'lib/acts_as_graph.rb', line 19

def children_method_name
  @children_method_name
end