Module: Pacer::IndexMixin

Included in:
DexAutomaticIndex, Neo4jIndex, TinkerIndex
Defined in:
lib/pacer/graph/index_mixin.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) all(key, value, extensions = nil)



20
21
22
23
24
25
26
27
28
# File 'lib/pacer/graph/index_mixin.rb', line 20

def all(key, value, extensions = nil)
  iter = get(key, value)
  if @graph or extensions
    iter.extend Pacer::Core::Route::IteratorExtensionsMixin
    iter.graph = @graph
    iter.extensions = extensions
  end
  iter
end

- (Object) first(key, value, extensions = nil)



11
12
13
14
15
16
17
18
# File 'lib/pacer/graph/index_mixin.rb', line 11

def first(key, value, extensions = nil)
  e = get(key, value).first
  if e and (@graph or extensions)
    e.graph = @graph
    e.add_extensions extensions
  end
  e
end

- (Object) graph



7
8
9
# File 'lib/pacer/graph/index_mixin.rb', line 7

def graph
  @graph
end

- (Object) graph=(graph)



3
4
5
# File 'lib/pacer/graph/index_mixin.rb', line 3

def graph=(graph)
  @graph = graph
end