Sha256: 3dee2e73343178f09970694059fccbf17921b65cec390327dcba169606a8d313

Contents?: true

Size: 1.64 KB

Versions: 56

Compression:

Stored size: 1.64 KB

Contents

# encoding: utf-8
require 'fedux_org_stdlib/rake/task'
require 'fedux_org_stdlib/project'

module FeduxOrgStdlib
  module Rake
    # Project Task
    #
    # @see Rakefile
    class ProjectTask < Task
      # @!attribute [r] report
      #   The report to be generated
      attr_reader :report

      # 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')}
      #     }
      #   )
      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
    end
  end
end

Version data entries

56 entries across 56 versions & 1 rubygems

Version Path
fedux_org-stdlib-0.11.18 lib/fedux_org_stdlib/rake/project_task.rb
fedux_org-stdlib-0.11.17 lib/fedux_org_stdlib/rake/project_task.rb
fedux_org-stdlib-0.11.16 lib/fedux_org_stdlib/rake/project_task.rb
fedux_org-stdlib-0.11.15 lib/fedux_org_stdlib/rake/project_task.rb
fedux_org-stdlib-0.11.14 lib/fedux_org_stdlib/rake/project_task.rb
fedux_org-stdlib-0.11.12 lib/fedux_org_stdlib/rake/project_task.rb
fedux_org-stdlib-0.11.11 lib/fedux_org_stdlib/rake/project_task.rb
fedux_org-stdlib-0.11.9 lib/fedux_org_stdlib/rake/project_task.rb
fedux_org-stdlib-0.11.8 lib/fedux_org_stdlib/rake/project_task.rb
fedux_org-stdlib-0.11.7 lib/fedux_org_stdlib/rake/project_task.rb
fedux_org-stdlib-0.11.6 lib/fedux_org_stdlib/rake/project_task.rb
fedux_org-stdlib-0.11.5 lib/fedux_org_stdlib/rake/project_task.rb
fedux_org-stdlib-0.11.4 lib/fedux_org_stdlib/rake/project_task.rb
fedux_org-stdlib-0.11.3 lib/fedux_org_stdlib/rake/project_task.rb
fedux_org-stdlib-0.11.2 lib/fedux_org_stdlib/rake/project_task.rb
fedux_org-stdlib-0.11.1 lib/fedux_org_stdlib/rake/project_task.rb
fedux_org-stdlib-0.11.0 lib/fedux_org_stdlib/rake/project_task.rb
fedux_org-stdlib-0.10.9 lib/fedux_org_stdlib/rake/project_task.rb
fedux_org-stdlib-0.10.8 lib/fedux_org_stdlib/rake/project_task.rb
fedux_org-stdlib-0.10.7 lib/fedux_org_stdlib/rake/project_task.rb