Class: Cucumber::Formatter::TagCloud
- 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
- #after_features(features) ⇒ Object
-
#initialize(step_mother, path_or_io, options) ⇒ TagCloud
constructor
A new instance of TagCloud.
- #tag_name(tag_name) ⇒ Object
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, ) @io = ensure_io(path_or_io, "tag_cloud") @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 |