Class: Fission::Fusion

Inherits:
Object show all
Defined in:
lib/fission/fusion.rb

Class Method Summary collapse

Class Method Details

.running?Boolean

Public: Determines if the VMware Fusion GUI application is running.

Examples

Fission::Fusion.running?
# => true

Returns a Boolean.

Returns:

  • (Boolean)


12
13
14
15
16
17
# File 'lib/fission/fusion.rb', line 12

def self.running?
  command = "ps -ef | grep -v grep | grep -c "
  command << "'#{Fission.config['gui_bin']}' 2>&1"
  command_executor = Fission::Action::ShellExecutor.new command
  command_executor.execute['output'].strip.to_i > 0
end