Class: RestartCommand

Inherits:
Command show all
Defined in:
lib/replicant/command.rb

Instance Attribute Summary

Attributes inherited from Command

#args

Instance Method Summary collapse

Methods inherited from Command

all, #execute, inherited, #initialize, load, #name, #usage

Constructor Details

This class inherits a constructor from Command

Instance Method Details

#descriptionObject



275
276
277
# File 'lib/replicant/command.rb', line 275

def description
  "restart ADB"
end

#runObject



279
280
281
282
283
284
285
# File 'lib/replicant/command.rb', line 279

def run
  # Faster than kill-server, and also catches ADB instances launched by
  # IntelliJ. Moreover, start-server after kill-server sometimes makes the
  # server fail to start up unless you sleep for a second or so
  `killall adb`
  AdbCommand.new(@repl, "start-server").execute
end