Class: Kotoshu::Tasks::CheckTask
- Inherits:
-
Object
- Object
- Kotoshu::Tasks::CheckTask
- Includes:
- Rake::DSL
- Defined in:
- lib/kotoshu/tasks/check_task.rb,
sig/kotoshu.rbs
Overview
Rake task checking a repository text files with the plan-88 file selection (plan 89, item 3).
Instance Attribute Summary collapse
-
#baseline_path ⇒ Object
Returns the value of attribute baseline_path.
-
#fail_on_error ⇒ Object
Returns the value of attribute fail_on_error.
-
#files ⇒ Object
Returns the value of attribute files.
-
#language ⇒ Object
Returns the value of attribute language.
-
#name ⇒ Object
Returns the value of attribute name.
-
#root ⇒ Object
Returns the value of attribute root.
Instance Method Summary collapse
-
#initialize(name = :check) {|task| ... } ⇒ CheckTask
constructor
A new instance of CheckTask.
-
#target_files ⇒ Array<String>
The files the task will check: the configured list, or the plan-88 selection over the root.
Constructor Details
#initialize(name = :check) {|task| ... } ⇒ CheckTask
Returns a new instance of CheckTask.
27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/kotoshu/tasks/check_task.rb', line 27 def initialize(name = :check, &block) @name = name @files = nil @root = Dir.pwd @language = nil @fail_on_error = true @baseline_path = nil yield self if block define end |
Instance Attribute Details
#baseline_path ⇒ Object
Returns the value of attribute baseline_path.
39 40 41 |
# File 'lib/kotoshu/tasks/check_task.rb', line 39 def baseline_path @baseline_path end |
#fail_on_error ⇒ Object
Returns the value of attribute fail_on_error.
39 40 41 |
# File 'lib/kotoshu/tasks/check_task.rb', line 39 def fail_on_error @fail_on_error end |
#files ⇒ Object
Returns the value of attribute files.
39 40 41 |
# File 'lib/kotoshu/tasks/check_task.rb', line 39 def files @files end |
#language ⇒ Object
Returns the value of attribute language.
39 40 41 |
# File 'lib/kotoshu/tasks/check_task.rb', line 39 def language @language end |
#name ⇒ Object
Returns the value of attribute name.
39 40 41 |
# File 'lib/kotoshu/tasks/check_task.rb', line 39 def name @name end |
#root ⇒ Object
Returns the value of attribute root.
39 40 41 |
# File 'lib/kotoshu/tasks/check_task.rb', line 39 def root @root end |
Instance Method Details
#target_files ⇒ Array<String>
The files the task will check: the configured list, or the plan-88 selection over the root.
45 46 47 48 49 |
# File 'lib/kotoshu/tasks/check_task.rb', line 45 def target_files return Array(files) if files Cli::DirectoryWalker.new.files(root) end |