Class: Filtered::FilterArray

Inherits:
Object
  • Object
show all
Defined in:
lib/rbbt/tsv/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



12
13
14
15
16
# File 'lib/rbbt/tsv/filter.rb', line 12

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.



6
7
8
# File 'lib/rbbt/tsv/filter.rb', line 6

def filters
  @filters
end

Instance Method Details

#idsObject



8
9
10
# File 'lib/rbbt/tsv/filter.rb', line 8

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