Module: Pacer::Filter::PropertyFilter::EdgeLabels

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

Instance Method Summary (collapse)

Instance Method Details

- (Object) filter_pipe(pipe, filters, block, expand_extensions)

Specialize filter_pipe for edge labels.



30
31
32
33
34
35
36
37
38
39
40
# File 'lib/pacer/filter/property_filter.rb', line 30

def filter_pipe(pipe, filters, block, expand_extensions)
  pipe, filters = expand_extension_conditions(pipe, filters) if expand_extensions
  labels = filters.select { |arg| arg.is_a? Symbol or arg.is_a? String }
  if labels.empty?
    super
  else
    label_pipe = Pacer::Pipes::LabelCollectionFilterPipe.new labels.collect { |l| l.to_s }, Pacer::Pipes::NOT_EQUAL
    label_pipe.set_starts pipe if pipe
    super(label_pipe, filters - labels, block, false)
  end
end