Sha256: 04faaf638d2183116950d0446ffac0d4927ed0a32a4473d898f17130be054900

Contents?: true

Size: 636 Bytes

Versions: 2

Compression:

Stored size: 636 Bytes

Contents

def init
  super
  sections.push :namespace
  @namespace = object
end

def namespace
  erb(:namespace)
end

def all_tags_by_letter
  hash = {}
  objects = tags
  objects = run_verifier(objects)
  objects.each {|o| (hash[o.value.to_s[1,1].upcase] ||= []) << o }
  hash
end

def tags
  @tags ||= Registry.all(:tag)
end

def features
  @features ||= Registry.all(:feature).sort {|x,y| x.value <=> y.value }
end

def scenarios
  @scenarios ||= features.collect {|f| f.scenarios.reject {|s| s.background? } }.flatten.sort {|x,y| x.value <=> y.value }
end

def tagify(tag)
  %{<span class="tag" href="#{url_for tag}">#{tag.value}</span>} 
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
cucumber-in-the-yard-1.7.2 lib/templates/default/featuretags/html/setup.rb
cucumber-in-the-yard-1.7.1 lib/templates/default/featuretags/html/setup.rb