Class: Gherkin::Tools::StatsListener

Inherits:
Object
  • Object
show all
Defined in:
lib/gherkin/tools/stats_listener.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeStatsListener

Returns a new instance of StatsListener.



7
8
9
10
11
# File 'lib/gherkin/tools/stats_listener.rb', line 7

def initialize
  @features  = 0
  @scenarios = 0
  @steps     = 0
end

Instance Attribute Details

#featuresObject (readonly)

Returns the value of attribute features.



5
6
7
# File 'lib/gherkin/tools/stats_listener.rb', line 5

def features
  @features
end

#scenariosObject (readonly)

Returns the value of attribute scenarios.



5
6
7
# File 'lib/gherkin/tools/stats_listener.rb', line 5

def scenarios
  @scenarios
end

#stepsObject (readonly)

Returns the value of attribute steps.



5
6
7
# File 'lib/gherkin/tools/stats_listener.rb', line 5

def steps
  @steps
end

Instance Method Details

#background(keyword, name, line) ⇒ Object



23
24
# File 'lib/gherkin/tools/stats_listener.rb', line 23

def background(keyword, name, line)
end

#comment(content, line) ⇒ Object



16
17
# File 'lib/gherkin/tools/stats_listener.rb', line 16

def comment(content, line)
end

#examples(keyword, name, line) ⇒ Object



33
34
# File 'lib/gherkin/tools/stats_listener.rb', line 33

def examples(keyword, name, line)
end

#feature(keyword, name, line) ⇒ Object



19
20
21
# File 'lib/gherkin/tools/stats_listener.rb', line 19

def feature(keyword, name, line)
  @features += 1
end

#py_string(string, line) ⇒ Object



43
44
# File 'lib/gherkin/tools/stats_listener.rb', line 43

def py_string(string, line)
end

#scenario(keyword, name, line) ⇒ Object



26
27
28
# File 'lib/gherkin/tools/stats_listener.rb', line 26

def scenario(keyword, name, line)
  @scenarios += 1
end

#scenario_outline(keyword, name, line) ⇒ Object



30
31
# File 'lib/gherkin/tools/stats_listener.rb', line 30

def scenario_outline(keyword, name, line)
end

#step(keyword, name, line) ⇒ Object



36
37
38
# File 'lib/gherkin/tools/stats_listener.rb', line 36

def step(keyword, name, line)
  @steps += 1
end

#syntax_error(state, event, legal_events, line) ⇒ Object



46
47
# File 'lib/gherkin/tools/stats_listener.rb', line 46

def syntax_error(state, event, legal_events, line)
end

#table(rows, line) ⇒ Object



40
41
# File 'lib/gherkin/tools/stats_listener.rb', line 40

def table(rows, line)
end

#tag(name, line) ⇒ Object



13
14
# File 'lib/gherkin/tools/stats_listener.rb', line 13

def tag(name, line)
end