Class: AdbCommand

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

Constant Summary collapse

ADB =

the command line program

'adb'

Instance Attribute Summary

Attributes inherited from Command

#args

Instance Method Summary collapse

Methods inherited from Command

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

Constructor Details

This class inherits a constructor from Command

Instance Method Details

#runObject



86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
# File 'lib/replicant/command.rb', line 86

def run
  begin
    cmd = "#{adb} #{args}"

    if interactive?
      system cmd
    else
      cmd << " #{@repl.default_package}" if @repl.default_package && package_dependent?
      output cmd if @repl.debug?
      result = `#{cmd}`
      output result
      result
    end
  end
end