class FeduxOrgStdlib::Rake::ProjectTask

Project Task

@see Rakefile

Attributes

report[R]

@!attribute [r] report

The report to be generated

Public Class Methods

new( report_file: File.join(Dir.getwd, 'reports', 'Overview.html'), plan_file: File.join(Dir.getwd, 'plan.tjp'), additional_files: [], **args ) click to toggle source

Create a new project task

@param [String] report_file

The main report file

@param [String] plan_file

The main plan file

@param [Array] additional_files

A list of additional files for the project plan

@example Create new task

FeduxOrgStdlib::Rake::ProjectTask.new

@example Create new task using a different report file

FeduxOrgStdlib::Rake::ProjectTask.new(
  report_file: File.join(Dir.getwd, 'reports', 'Index.html')
)

@example Create new task using a different project plan and adding additional files

FeduxOrgStdlib::Rake::ProjectTask.new(
  plan_file: File.join(Dir.getwd, 'project1.tjp'),
  additional_files: %W{
  #{File.join(Dir.getwd, 'resources.tjp')}
  #{File.join(Dir.getwd, 'leaves.tjp')}
  }
)
Calls superclass method
# File lib/fedux_org_stdlib/rake/project_task.rb, line 40
def initialize(
  report_file: File.join(Dir.getwd, 'reports', 'Overview.html'),
  plan_file: File.join(Dir.getwd, 'plan.tjp'),
  additional_files: [],
  **args
)
  super(**args)

  plan    = FeduxOrgStdlib::Project::Plan.new(main_file: plan_file, additional_files: additional_files)
  @report = FeduxOrgStdlib::Project::Report.new(plan: plan, output_file: report_file)
end