Parent

Gherkin::Formatter::TagCountFormatter

Public Class Methods

new(formatter, tag_counts) click to toggle source
   # File lib/gherkin/formatter/tag_count_formatter.rb, line 4
4:       def initialize(formatter, tag_counts)
5:         @formatter = formatter
6:         @tag_counts = tag_counts
7:       end

Public Instance Methods

examples(examples) click to toggle source
    # File lib/gherkin/formatter/tag_count_formatter.rb, line 28
28:       def examples(examples)
29:         record_tags((@feature_tags.to_a + @scenario_outline_tags.to_a + examples.tags.to_a).uniq, examples.line)
30:         @formatter.examples(examples)
31:       end
feature(feature) click to toggle source
    # File lib/gherkin/formatter/tag_count_formatter.rb, line 13
13:       def feature(feature)
14:         @feature_tags = feature.tags
15:         @formatter.feature(feature)
16:       end
scenario(scenario) click to toggle source
    # File lib/gherkin/formatter/tag_count_formatter.rb, line 18
18:       def scenario(scenario)
19:         record_tags((@feature_tags.to_a + scenario.tags.to_a).uniq, scenario.line)
20:         @formatter.scenario(scenario)
21:       end
scenario_outline(scenario_outline) click to toggle source
    # File lib/gherkin/formatter/tag_count_formatter.rb, line 23
23:       def scenario_outline(scenario_outline)
24:         @scenario_outline_tags = scenario_outline.tags
25:         @formatter.scenario_outline(scenario_outline)
26:       end
uri(uri) click to toggle source
    # File lib/gherkin/formatter/tag_count_formatter.rb, line 9
 9:       def uri(uri)
10:         @uri = uri
11:       end

Private Instance Methods

method_missing(*args) click to toggle source
    # File lib/gherkin/formatter/tag_count_formatter.rb, line 42
42:       def method_missing(*args)
43:         @formatter.__send__(*args)
44:       end
record_tags(tags, line) click to toggle source
    # File lib/gherkin/formatter/tag_count_formatter.rb, line 35
35:       def record_tags(tags, line)
36:         tags.each do |tag|
37:           @tag_counts[tag.name] ||= []
38:           @tag_counts[tag.name] << "#{@uri}:#{line}"
39:         end
40:       end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.