### Home Classes Methods

### In Files

- lib/gherkin/parser/filter_listener.rb

### Parent

Object

### Methods

- ::new
- #location

### Files

- LICENSE
- README.rdoc
- meta.txt
- root.txt
- steps.txt
- README.rdoc

### Class/Module Index

Quicksearch

- Gherkin
- Gherkin::CLexer
- Gherkin::Cli
- Gherkin::Cli::Main
- Gherkin::Formatter
- Gherkin::Formatter::Argument
- Gherkin::Formatter::Colors
- Gherkin::Formatter::Escaping
- Gherkin::Formatter::JSONFormatter
- Gherkin::Formatter::MonochromeFormat
- Gherkin::Formatter::PrettyFormatter
- Gherkin::I18n
- Gherkin::I18nLexer
- Gherkin::JSONLexer
- Gherkin::Parser
- Gherkin::Parser::Event
- Gherkin::Parser::FilterListener
- Gherkin::Parser::FormatterListener
- Gherkin::Parser::ParseError
- Gherkin::Parser::Parser
- Gherkin::Parser::Parser::Machine
- Gherkin::Parser::Parser::Machine::StateMachineReader
- Gherkin::Parser::Row
- Gherkin::Parser::TagExpression
- Gherkin::RbLexer
- Gherkin::Rubify
- Gherkin::Tools
- Gherkin::Tools::Files
- Gherkin::Tools::Reformat
- Gherkin::Tools::Stats
- Gherkin::Tools::StatsListener
- Class

No matching classes.

# Gherkin::Parser::FilterListener

This class filters events based on filter criteria.

### Public Class Methods

new(listener, filters) click to toggle source

Creates a new instance that replays events to `listener`, filtered by `filters`, an Array that can contain one of the following:

- Line numbers (Fixnum) to filter on.

- Name regexen (Regexp) to filter on. Matches against :feature, :background, :scenario, :scenario_outline and :examples

- Tag expressions (String) to filter on.

    # File lib/gherkin/parser/filter_listener.rb, line 18
    def initialize(listener, filters)
      @listener = listener
      @filter_method = detect_filter(filters)

      @meta_buffer = []
      @feature_buffer = []
      @scenario_buffer = []
      @examples_buffer = []
      @examples_rows_buffer = []

      @feature_tags = []
      @scenario_tags = []
      @example_tags = []

      @table_state = :step
    end

### Public Instance Methods

location(uri, offset) click to toggle source

    # File lib/gherkin/parser/filter_listener.rb, line 35
    def location(uri, offset)
      @listener.location(uri, offset)
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.