Class: Filtered::FilterArray

Inherits:
Object
  • Object
show all
Defined in:
lib/scout/tsv/util/filter.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *args) ⇒ Object



11
12
13
14
15
# File 'lib/scout/tsv/util/filter.rb', line 11

def method_missing(name, *args)
  filters.each do |filter|
    filter.send(name, *args)
  end
end

Instance Attribute Details

#filtersObject

Returns the value of attribute filters.



5
6
7
# File 'lib/scout/tsv/util/filter.rb', line 5

def filters
  @filters
end

Instance Method Details

#idsObject



7
8
9
# File 'lib/scout/tsv/util/filter.rb', line 7

def ids
  ids = filters.inject(nil){|list,filter| list.nil? ? filter.ids.dup : Misc.merge_sorted_arrays(list, filter.ids.dup)}
end