class FeduxOrgStdlib::Project::Plan

Plan file

Attributes

additional_files[R]
main_file[R]

Public Class Methods

new( main_file: File.expand_path('plan.tjp'), additional_files: [] ) click to toggle source

Create a new project plan

@param [String] main_file

The main project file

@param [Array] additional_files

Additional files containing information about project plan
# File lib/fedux_org_stdlib/project/plan.rb, line 18
def initialize(
  main_file: File.expand_path('plan.tjp'),
  additional_files: []
)
  @main_file        = main_file
  @additional_files = Array(additional_files)
end

Public Instance Methods

needs_to_be_compiled?(base_file) click to toggle source

Does the plan needs to be compiled

@param [String] base_file

The output file which should be used to determine if the report is
older then the project plan

@return [true,false]

Result of comparism
# File lib/fedux_org_stdlib/project/plan.rb, line 33
def needs_to_be_compiled?(base_file)
  (Array(main_file) + additional_files).any? { |f| File.mtime(f) > File.mtime(base_file) }
end
to_s() click to toggle source

Output a textual representation of self

@return [String]

The path to the main file of the project plan
# File lib/fedux_org_stdlib/project/plan.rb, line 41
def to_s
  main_file
end