Class: Gherkin::Formatter::RegexpFilter

Inherits:
Object
  • Object
show all
Defined in:
lib/gherkin/formatter/regexp_filter.rb

Instance Method Summary collapse

Constructor Details

#initialize(regexen) ⇒ RegexpFilter


4
5
6
# File 'lib/gherkin/formatter/regexp_filter.rb', line 4

def initialize(regexen)
  @regexen = regexen
end

Instance Method Details

#evaluate(tags, names, ranges) ⇒ Object


8
9
10
11
12
13
14
# File 'lib/gherkin/formatter/regexp_filter.rb', line 8

def evaluate(tags, names, ranges)
  @regexen.detect do |regexp| 
    names.detect do |name|
      name =~ regexp
    end
  end
end

#filter_table_body_rows(rows) ⇒ Object


16
17
18
# File 'lib/gherkin/formatter/regexp_filter.rb', line 16

def filter_table_body_rows(rows)
  rows
end