Class: Cucumber::Formatter::TagCloud

Inherits:
Object
  • Object
show all
Defined in:
lib/cucumber/formatter/tag_cloud.rb

Overview

The formatter used for --format tag_cloud Custom formatter that prints a tag cloud as a table.

Instance Method Summary collapse

Constructor Details

#initialize(step_mother, io, options) ⇒ TagCloud

Returns a new instance of TagCloud.



6
7
8
9
10
# File 'lib/cucumber/formatter/tag_cloud.rb', line 6

def initialize(step_mother, io, options)
  @io = io
  @options = options
  @counts = Hash.new{|h,k| h[k] = 0}
end

Instance Method Details

#after_features(features) ⇒ Object



12
13
14
# File 'lib/cucumber/formatter/tag_cloud.rb', line 12

def after_features(features)
  print_summary(features)
end

#tag_name(tag_name) ⇒ Object



16
17
18
# File 'lib/cucumber/formatter/tag_cloud.rb', line 16

def tag_name(tag_name)
  @counts[tag_name] += 1
end