Class: R10K::Util::Subprocess::Runner Private

Inherits:
Object
  • Object
show all
Defined in:
lib/r10k/util/subprocess/runner.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Define an abstract interface for external command runners.

Direct Known Subclasses

POSIX::Runner, Windows::Runner

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(argv) ⇒ Runner

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Runner.

Raises:

  • (NotImplementedError)


23
24
25
# File 'lib/r10k/util/subprocess/runner.rb', line 23

def initialize(argv)
  raise NotImplementedError
end

Instance Attribute Details

#cwdString

Returns The directory to be used as the cwd when executing the command.

Returns:

  • (String)

    The directory to be used as the cwd when executing the command.



9
10
11
# File 'lib/r10k/util/subprocess/runner.rb', line 9

def cwd
  @cwd
end

#ioObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



11
12
13
# File 'lib/r10k/util/subprocess/runner.rb', line 11

def io
  @io
end

#pidObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



13
14
15
# File 'lib/r10k/util/subprocess/runner.rb', line 13

def pid
  @pid
end

#resultObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



21
22
23
# File 'lib/r10k/util/subprocess/runner.rb', line 21

def result
  @result
end

#statusObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



17
18
19
# File 'lib/r10k/util/subprocess/runner.rb', line 17

def status
  @status
end

Instance Method Details

#crashed?Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Did the given process exit with a non-zero exit code?

Returns:

  • (Boolean)

Raises:

  • (NotImplementedError)


42
43
44
# File 'lib/r10k/util/subprocess/runner.rb', line 42

def crashed?
  raise NotImplementedError
end

#exit_codeInteger

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns The exit status of the given process.

Returns:

  • (Integer)

    The exit status of the given process.

Raises:

  • (NotImplementedError)


47
48
49
# File 'lib/r10k/util/subprocess/runner.rb', line 47

def exit_code
  raise NotImplementedError
end

#runObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Raises:

  • (NotImplementedError)


27
28
29
# File 'lib/r10k/util/subprocess/runner.rb', line 27

def run
  raise NotImplementedError
end

#startObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Start the process asynchronously and return. Not all runners will implement this.

Raises:

  • (NotImplementedError)


32
33
34
# File 'lib/r10k/util/subprocess/runner.rb', line 32

def start
  raise NotImplementedError
end

#waitObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Wait for the process to exit. Not all runners will implement this.

Raises:

  • (NotImplementedError)


37
38
39
# File 'lib/r10k/util/subprocess/runner.rb', line 37

def wait
  raise NotImplementedError
end