### Home Classes Methods

### In Files

- lib/gherkin/tools/stats.rb

### Parent

Files

### Methods

- #run

### 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::Tools::Stats

### Public Instance Methods

run() click to toggle source

    # File lib/gherkin/tools/stats.rb, line 8
    def run
      listener = StatsListener.new
      each do |f|
        parser = Gherkin::Parser::Parser.new(listener, true)
        lexer = Gherkin::I18nLexer.new(parser)
        lexer.scan(IO.read(f), f, 0)
      end
      puts "Features:  #{listener.features}"
      puts "Scenarios: #{listener.scenarios}"
      puts "Steps:     #{listener.steps}"
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.