Class: Ibex::BoundedSubprocess::Result

Inherits:
Object
  • Object
show all
Defined in:
lib/ibex/bounded_subprocess.rb,
sig/ibex/bounded_subprocess.rbs

Overview

Immutable observation of one bounded child-process execution.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(stdout:, stderr:, status:, timed_out:, output_limited:) ⇒ Result

Returns a new instance of Result.

RBS:

  • (stdout: String, stderr: String, status: Process::Status, timed_out: bool, output_limited: bool) -> void

Parameters:

  • stdout: (String)
  • stderr: (String)
  • status: (Process::Status)
  • timed_out: (Boolean)
  • output_limited: (Boolean)


24
25
26
27
28
29
30
31
# File 'lib/ibex/bounded_subprocess.rb', line 24

def initialize(stdout:, stderr:, status:, timed_out:, output_limited:)
  @stdout = stdout.freeze
  @stderr = stderr.freeze
  @status = status
  @timed_out = timed_out
  @output_limited = output_limited
  freeze
end

Instance Attribute Details

#output_limitedBoolean (readonly)

Signature:

  • bool

Returns:

  • (Boolean)


20
21
22
# File 'lib/ibex/bounded_subprocess.rb', line 20

def output_limited
  @output_limited
end

#statusProcess::Status (readonly)

Signature:

  • Process::Status

Returns:

  • (Process::Status)


18
19
20
# File 'lib/ibex/bounded_subprocess.rb', line 18

def status
  @status
end

#stderrString (readonly)

Signature:

  • String

Returns:

  • (String)


17
18
19
# File 'lib/ibex/bounded_subprocess.rb', line 17

def stderr
  @stderr
end

#stdoutString (readonly)

Signature:

  • String

Returns:

  • (String)


16
17
18
# File 'lib/ibex/bounded_subprocess.rb', line 16

def stdout
  @stdout
end

#timed_outBoolean (readonly)

Signature:

  • bool

Returns:

  • (Boolean)


19
20
21
# File 'lib/ibex/bounded_subprocess.rb', line 19

def timed_out
  @timed_out
end