Class: Ibex::BoundedSubprocess::Result

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

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.



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_limitedObject (readonly)

: bool



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

def output_limited
  @output_limited
end

#statusObject (readonly)

: Process::Status



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

def status
  @status
end

#stderrObject (readonly)

: String



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

def stderr
  @stderr
end

#stdoutObject (readonly)

: String



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

def stdout
  @stdout
end

#timed_outObject (readonly)

: bool



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

def timed_out
  @timed_out
end