Module: Pacer::Filter::IndexFilter

Defined in:
lib/pacer/filter/index_filter.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#indexObject

Returns the value of attribute index.



4
5
6
# File 'lib/pacer/filter/index_filter.rb', line 4

def index
  @index
end

#keyObject

Returns the value of attribute key.



4
5
6
# File 'lib/pacer/filter/index_filter.rb', line 4

def key
  @key
end

#valueObject

Returns the value of attribute value.



4
5
6
# File 'lib/pacer/filter/index_filter.rb', line 4

def value
  @value
end

Instance Method Details

#countObject



6
7
8
9
10
11
12
13
14
15
16
# File 'lib/pacer/filter/index_filter.rb', line 6

def count
  if @index and @key and @value
    if @index.respond_to? :count
      @index.count(@key, graph.encode_property(@value))
    else
      super
    end
  else
    super
  end
end