Class: Cucumber::Formatter::TagCloud

Inherits:
Object
  • Object
show all
Includes:
Io
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

Methods included from Io

#ensure_dir, #ensure_file, #ensure_io

Constructor Details

#initialize(step_mother, path_or_io, options) ⇒ TagCloud

Returns a new instance of TagCloud.



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

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

Instance Method Details

#after_features(features) ⇒ Object



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

def after_features(features)
  print_summary(features)
end

#tag_name(tag_name) ⇒ Object



21
22
23
# File 'lib/cucumber/formatter/tag_cloud.rb', line 21

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