Sha256: 7a231f810145a0437fd0d360c5e0d086a83bc8cf24f303b9dd6b015e2348c292
Contents?: true
Size: 1022 Bytes
Versions: 3
Compression:
Stored size: 1022 Bytes
Contents
def init super sections.push :directory @directory = object end def directory @objects_by_letter = all_types_by_letter(YARD::CodeObjects::Cucumber::Feature) @directories_by_letter = @directory.children.find_all {|child| child.is_a?(YARD::CodeObjects::Cucumber::FeatureDirectory) }.sort_by {|dir| dir.name.to_s } erb(:directory) end def all_types_by_letter(type) hash = {} objects = @directory.children.find_all {|child| child.is_a?(type) } objects = run_verifier(objects) objects.each {|o| (hash[o.value.to_s[0,1].upcase] ||= []) << o } hash.values.each {|v| v.sort! {|a,b| b.value.to_s <=> a.value.to_s } } hash end def features @directory.children.find_all{|child| child.is_a?(YARD::CodeObjects::Cucumber::Feature)} end def scenarios features.collect {|feature| feature.scenarios }.flatten end def steps scenarios.collect {|scenario| scenario.steps }.flatten end def tags (features.collect{|feature| feature.tags } + scenarios.collect {|scenario| scenario.tags }).flatten.uniq end
Version data entries
3 entries across 3 versions & 1 rubygems