Sha256: 4d66c8bd71930dd9574ca344cada9c8ae1c41cfa2b35f42b396fe639fd863f08
Contents?: true
Size: 667 Bytes
Versions: 14
Compression:
Stored size: 667 Bytes
Contents
module Wally class CountsTags def initialize project @project = project end def count_tags @project.features.inject(Hash.new(0)) do |tag_count, feature| if feature.gherkin["tags"] feature.gherkin["tags"].each do |tag| tag_count[tag["name"].downcase] += 1 end end if feature.gherkin["elements"] feature.gherkin["elements"].each do |element| if element["tags"] element["tags"].each do |tag| tag_count[tag["name"].downcase] += 1 end end end end tag_count end end end end
Version data entries
14 entries across 14 versions & 1 rubygems