Class: Abtab::Filter::Grep
Instance Attribute Summary
#driver
Instance Method Summary
collapse
#initialize
Constructor Details
This class inherits a constructor from Abtab::Filter
Instance Method Details
#columns ⇒ Object
22
23
24
|
# File 'lib/abtab/filter/grep.rb', line 22
def columns
@driver.columns
end
|
#filter_predicate=(p) ⇒ Object
6
7
8
|
# File 'lib/abtab/filter/grep.rb', line 6
def filter_predicate= p
@filter = p
end
|
#next_record ⇒ Object
10
11
12
13
14
15
16
17
18
19
20
|
# File 'lib/abtab/filter/grep.rb', line 10
def next_record
rec = nil
while rec = driver.next_record
if @filter.call(rec)
break
else
0
end
end
return rec
end
|