Class: VivlioStarter::CLI::DoctorCommands::ToolUpgrader::Tool
- Inherits:
-
Data
- Object
- Data
- VivlioStarter::CLI::DoctorCommands::ToolUpgrader::Tool
- Defined in:
- lib/vivlio_starter/cli/doctor/tool_upgrader.rb
Overview
ツール定義。checks は doctor.rb の診断ラベル(missing 判定との突き合わせ用)。 brew formula / npm パッケージ名の正典はこの表であり、--fix のインストール処理も brew_install_packages 経由でここを参照する(doctor.rb 側と二重管理しない・spec §4-1)。
Instance Attribute Summary collapse
-
#checks ⇒ Object
readonly
Returns the value of attribute checks.
-
#kind ⇒ Object
readonly
Returns the value of attribute kind.
-
#label ⇒ Object
readonly
Returns the value of attribute label.
-
#package ⇒ Object
readonly
Returns the value of attribute package.
Instance Method Summary collapse
-
#matches_formula?(name) ⇒ Boolean
brew の導入記録との突き合わせ。node はバージョン付き別名(node@20 等)で 導入されていることがあるため前方一致相当で拾う.
Instance Attribute Details
#checks ⇒ Object (readonly)
Returns the value of attribute checks
52 53 54 |
# File 'lib/vivlio_starter/cli/doctor/tool_upgrader.rb', line 52 def checks @checks end |
#kind ⇒ Object (readonly)
Returns the value of attribute kind
52 53 54 |
# File 'lib/vivlio_starter/cli/doctor/tool_upgrader.rb', line 52 def kind @kind end |
#label ⇒ Object (readonly)
Returns the value of attribute label
52 53 54 |
# File 'lib/vivlio_starter/cli/doctor/tool_upgrader.rb', line 52 def label @label end |
#package ⇒ Object (readonly)
Returns the value of attribute package
52 53 54 |
# File 'lib/vivlio_starter/cli/doctor/tool_upgrader.rb', line 52 def package @package end |
Instance Method Details
#matches_formula?(name) ⇒ Boolean
brew の導入記録との突き合わせ。node はバージョン付き別名(node@20 等)で 導入されていることがあるため前方一致相当で拾う
55 56 57 58 59 |
# File 'lib/vivlio_starter/cli/doctor/tool_upgrader.rb', line 55 def matches_formula?(name) return name.match?(/\Anode(@\d+)?\z/) if package == 'node' name == package end |