Sha256: cb203568e8c184e7f3b36cc2952af580fae913cdf9313c9db4c9b48a41e23117

Contents?: true

Size: 1.25 KB

Versions: 3

Compression:

Stored size: 1.25 KB

Contents

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

end

def features
  @features ||= Registry.all(:feature)
end

def tags
  @tags ||= Registry.all(:tag).sort_by {|l| l.value.to_s }
end

def feature_directories
  @feature_directories ||= YARD::CodeObjects::Cucumber::CUCUMBER_NAMESPACE.children.find_all {|child| child.is_a?(YARD::CodeObjects::Cucumber::FeatureDirectory)}
end

def feature_subdirectories
  @feature_subdirectories ||= Registry.all(:featuredirectory) - feature_directories
end

def step_transformers
  YARD::CodeObjects::Cucumber::CUCUMBER_STEPTRANSFORM_NAMESPACE
end

def step_definitions
  @step_definitions ||= YARD::Registry.all(:stepdefinition)
end

def placeholders
  @placeholders ||= YARD::Registry.all(:placeholder)
end

def undefined_steps
  @undefined_steps ||= Registry.all(:step).reject {|s| s.definition || s.scenario.outline? }
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

3 entries across 3 versions & 1 rubygems

Version Path
yard-gherkin-turnip-1.0.2 lib/templates/default/requirements/html/setup.rb
yard-gherkin-turnip-1.0.1 lib/templates/default/requirements/html/setup.rb
yard-gherkin-turnip-1.0.0 lib/templates/default/requirements/html/setup.rb