Module: Pacer::Filter::PropertyFilter

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

Defined Under Namespace

Modules: EdgeLabels

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#blockObject

Returns the value of attribute block



47
48
49
# File 'lib/pacer/filter/property_filter.rb', line 47

def block
  @block
end

Class Method Details

.triggersObject



43
44
45
# File 'lib/pacer/filter/property_filter.rb', line 43

def self.triggers
  [:filters]
end

Instance Method Details

#filtersObject

Return an array of filter options for the current route.



63
64
65
# File 'lib/pacer/filter/property_filter.rb', line 63

def filters
  @filters ||= []
end

#filters=(filter_array) ⇒ Object



49
50
51
52
53
54
55
56
57
58
59
60
# File 'lib/pacer/filter/property_filter.rb', line 49

def filters=(filter_array)
  case filter_array
  when Array
    @filters = filter_array
  when nil
    @filters = []
  else
    @filters = [filter_array]
  end
  # Sometimes filters are modules. If they contain a Route submodule, extend this route with that module.
  add_extensions @filters
end