Class: Reviewer::Doctor::ToolInventory
- Inherits:
-
Object
- Object
- Reviewer::Doctor::ToolInventory
- Defined in:
- lib/reviewer/doctor/tool_inventory.rb
Overview
Reports the status of each configured tool
Instance Attribute Summary collapse
-
#report ⇒ Object
readonly
Returns the value of attribute report.
Instance Method Summary collapse
-
#check ⇒ Object
Reports batch/skip status and available commands for each configured tool.
-
#initialize(report, configuration:, tools:) ⇒ ToolInventory
constructor
Creates a tool inventory check that reports batch/skip status for each tool.
Constructor Details
#initialize(report, configuration:, tools:) ⇒ ToolInventory
Creates a tool inventory check that reports batch/skip status for each tool
15 16 17 18 19 |
# File 'lib/reviewer/doctor/tool_inventory.rb', line 15 def initialize(report, configuration:, tools:) @report = report @configuration = configuration @tools = tools end |
Instance Attribute Details
#report ⇒ Object (readonly)
Returns the value of attribute report.
7 8 9 |
# File 'lib/reviewer/doctor/tool_inventory.rb', line 7 def report @report end |
Instance Method Details
#check ⇒ Object
Reports batch/skip status and available commands for each configured tool
22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/reviewer/doctor/tool_inventory.rb', line 22 def check return unless @configuration.file.exist? @tools.all.each do |tool| report.add_configured_tool( key: tool.key, name: tool.name, skip_in_batch: tool.skip_in_batch?, commands: configured_commands(tool), files: configured_files(tool), source: { path: configuration_path, location: tool.key.to_s } ) end end |