class Cucumber::Formatter::TagCloud

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

def after_features(features)

def after_features(features)
  print_summary(features)
end

def initialize(step_mother, path_or_io, options)

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

def print_summary(features)

def print_summary(features)
  matrix = @counts.to_a.sort{|paira, pairb| paira[0] <=> pairb[0]}.transpose
  table = Cucumber::Ast::Table.new(matrix)
  formatter = Cucumber::Formatter::Pretty.new(@step_mother, @io, {})
  Cucumber::Ast::TreeWalker.new(@step_mother, [formatter], {}).visit_multiline_arg(table)
end

def tag_name(tag_name)

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