Class: Cosmos::LauncherMultitool

Inherits:
Qt::Object
  • Object
show all
Defined in:
lib/cosmos/tools/launcher/launcher_multitool.rb

Instance Method Summary collapse

Constructor Details

#initialize(parent, multitool_settings) ⇒ LauncherMultitool

Returns a new instance of LauncherMultitool.



19
20
21
22
# File 'lib/cosmos/tools/launcher/launcher_multitool.rb', line 19

def initialize(parent, multitool_settings)
  super(parent)
  @multitool_settings = multitool_settings
end

Instance Method Details

#button_clickedObject



24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/cosmos/tools/launcher/launcher_multitool.rb', line 24

def button_clicked
  @multitool_settings.each do |item_type, item, capture_io|
    case item_type
    when :TOOL
      if capture_io
        Cosmos.run_process_check_output(item)
      else
        Cosmos.run_process(item)
      end
    when :DELAY
      sleep(item)
    end
  end
end