Sha256: cf9abe4630227bcc435b25d31e8c04fc86aa7e6bc11593c837fddd00ada7296e

Contents?: true

Size: 1.04 KB

Versions: 14

Compression:

Stored size: 1.04 KB

Contents

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

def markdown(text)
  htmlify(text,:markdown) rescue h(text)
end

def htmlify_with_newlines(text)
  text.split("\n").collect {|c| h(c).gsub(/\s/,'&nbsp;') }.join("<br/>")
end

def directories
  @directories ||= @directory.subdirectories
end

def features
  @features ||= @directory.features + directories.collect {|d| d.features }.flatten
end

def scenarios
  @scenarios ||= features.collect {|feature| feature.scenarios }.flatten
end

def tags
  @tags ||= (features.collect{|feature| feature.tags } + scenarios.collect {|scenario| scenario.tags }).flatten.uniq.sort_by {|l,o| l.value.to_s }
end

def alpha_table(objects)
  @elements = Hash.new

  objects = run_verifier(objects)
  objects.each {|o| (@elements[o.value.to_s[0,1].upcase] ||= []) << o }
  @elements.values.each {|v| v.sort! {|a,b| b.value.to_s <=> a.value.to_s } }
  @elements = @elements.sort_by {|l,o| l.to_s }

  @elements.each {|letter,objects| objects.sort! {|a,b| b.value.to_s <=> a.value.to_s }}
  erb(:alpha_table)
end

Version data entries

14 entries across 14 versions & 2 rubygems

Version Path
yard-cucumber-2.2.0 lib/templates/default/featuredirectory/html/setup.rb
yard-cucumber-2.1.7 lib/templates/default/featuredirectory/html/setup.rb
yard-cucumber-2.1.6 lib/templates/default/featuredirectory/html/setup.rb
yard-cucumber-2.1.5 lib/templates/default/featuredirectory/html/setup.rb
yard-cucumber-2.1.4 lib/templates/default/featuredirectory/html/setup.rb
yard-cucumber-2.1.3 lib/templates/default/featuredirectory/html/setup.rb
yard-cucumber-2.1.2 lib/templates/default/featuredirectory/html/setup.rb
yard-cucumber-2.1.1 lib/templates/default/featuredirectory/html/setup.rb
yard-cucumber-2.1.0 lib/templates/default/featuredirectory/html/setup.rb
yard-cucumber-2.0.3 lib/templates/default/featuredirectory/html/setup.rb
yard-cucumber-2.0.2 lib/templates/default/featuredirectory/html/setup.rb
yard-cucumber-2.0.1 lib/templates/default/featuredirectory/html/setup.rb
yard-cucumber-2.0.0 lib/templates/default/featuredirectory/html/setup.rb
cucumber-in-the-yard-1.7.8 lib/templates/default/featuredirectory/html/setup.rb