Class: VivlioStarter::CLI::DoctorCommands::ToolUpgrader::Deps
- Inherits:
-
Data
- Object
- Data
- VivlioStarter::CLI::DoctorCommands::ToolUpgrader::Deps
- Defined in:
- lib/vivlio_starter/cli/doctor/tool_upgrader.rb
Overview
実行依存の注入点(テストで外部コマンド・ネットワーク・端末入力を遮断するための DI)。 run: ->(cmd) { Boolean } system 相当 capture: ->(cmd) { [String, Boolean] } 標準出力と成否 fetch: ->(url) { String | nil } HTTP GET(タイムアウト 2 秒・失敗は nil) stdin: IO 確認プロンプト入力
Instance Attribute Summary collapse
-
#capture ⇒ Object
readonly
Returns the value of attribute capture.
-
#fetch ⇒ Object
readonly
Returns the value of attribute fetch.
-
#run ⇒ Object
readonly
Returns the value of attribute run.
-
#stdin ⇒ Object
readonly
Returns the value of attribute stdin.
Instance Attribute Details
#capture ⇒ Object (readonly)
Returns the value of attribute capture
147 148 149 |
# File 'lib/vivlio_starter/cli/doctor/tool_upgrader.rb', line 147 def capture @capture end |
#fetch ⇒ Object (readonly)
Returns the value of attribute fetch
147 148 149 |
# File 'lib/vivlio_starter/cli/doctor/tool_upgrader.rb', line 147 def fetch @fetch end |
#run ⇒ Object (readonly)
Returns the value of attribute run
147 148 149 |
# File 'lib/vivlio_starter/cli/doctor/tool_upgrader.rb', line 147 def run @run end |
#stdin ⇒ Object (readonly)
Returns the value of attribute stdin
147 148 149 |
# File 'lib/vivlio_starter/cli/doctor/tool_upgrader.rb', line 147 def stdin @stdin end |