Class: Cuporter::TreeReport

Inherits:
ReportBase show all
Defined in:
lib/cuporter/report/tree_report.rb

Instance Attribute Summary

Attributes inherited from ReportBase

#doc, #filter, #root_dir, #view

Instance Method Summary collapse

Methods inherited from ReportBase

#build, create, #files, #initialize, #no_leaves?, #number?, #show_files?, #show_tags?, #sort?, #total?

Constructor Details

This class inherits a constructor from Cuporter::ReportBase

Instance Method Details

#report_nodeObject



5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/cuporter/report/tree_report.rb', line 5

def report_node
  unless @folders
    @folders = Cuporter::Node.new_node(:Report, @doc, :title => title, :view => view)
    files.each do |file|
      feature = FeatureParser.node(file, @doc, @filter, root_dir)
      if feature && feature.has_children?
        path = feature.file_path.split(File::SEPARATOR)
        @folders.add_leaf(feature, *path)
      end
    end
  end
  @folders
end

#titleObject



19
20
21
# File 'lib/cuporter/report/tree_report.rb', line 19

def title
  @title || "Cucumber Features, Tree View"
end