Class: VivlioStarter::CLI::DoctorCommands::ToolUpgrader::Deps

Inherits:
Data
  • Object
show all
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

Instance Attribute Details

#captureObject (readonly)

Returns the value of attribute capture

Returns:

  • (Object)

    the current value of capture



147
148
149
# File 'lib/vivlio_starter/cli/doctor/tool_upgrader.rb', line 147

def capture
  @capture
end

#fetchObject (readonly)

Returns the value of attribute fetch

Returns:

  • (Object)

    the current value of fetch



147
148
149
# File 'lib/vivlio_starter/cli/doctor/tool_upgrader.rb', line 147

def fetch
  @fetch
end

#runObject (readonly)

Returns the value of attribute run

Returns:

  • (Object)

    the current value of run



147
148
149
# File 'lib/vivlio_starter/cli/doctor/tool_upgrader.rb', line 147

def run
  @run
end

#stdinObject (readonly)

Returns the value of attribute stdin

Returns:

  • (Object)

    the current value of stdin



147
148
149
# File 'lib/vivlio_starter/cli/doctor/tool_upgrader.rb', line 147

def stdin
  @stdin
end