Module: Pacer::Utils::Trie

Defined in:
lib/pacer/utils/trie.rb

Defined Under Namespace

Modules: Vertex

Class Method Summary collapse

Class Method Details

.route_conditionsObject



13
14
15
# File 'lib/pacer/utils/trie.rb', line 13

def route_conditions
  { :type => 'Trie' }
end

.trie(graph, name) ⇒ Object



4
5
6
7
8
9
10
11
# File 'lib/pacer/utils/trie.rb', line 4

def trie(graph, name)
  t = graph.v(self, :name => name).first
  if t
    t
  else
    graph.create_vertex self, :type => 'Trie', :name => name
  end
end