Class: Hermetic::Result
- Inherits:
-
Struct
- Object
- Struct
- Hermetic::Result
- Defined in:
- lib/hermetic/result.rb
Overview
Superset of Silas::Sandbox::Result — the first three members are the ones
Silas's run_code tool reads, so a Hermetic box drops into
config.sandbox = <object> with zero Silas changes. trust/backend make
the isolation posture legible on every result (see spec §3).
Instance Attribute Summary collapse
-
#backend ⇒ Object
Returns the value of attribute backend.
-
#duration_ms ⇒ Object
Returns the value of attribute duration_ms.
-
#exit_status ⇒ Object
Returns the value of attribute exit_status.
-
#stderr ⇒ Object
Returns the value of attribute stderr.
-
#stdout ⇒ Object
Returns the value of attribute stdout.
-
#timed_out ⇒ Object
Returns the value of attribute timed_out.
-
#trust ⇒ Object
Returns the value of attribute trust.
Instance Method Summary collapse
Instance Attribute Details
#backend ⇒ Object
Returns the value of attribute backend
6 7 8 |
# File 'lib/hermetic/result.rb', line 6 def backend @backend end |
#duration_ms ⇒ Object
Returns the value of attribute duration_ms
6 7 8 |
# File 'lib/hermetic/result.rb', line 6 def duration_ms @duration_ms end |
#exit_status ⇒ Object
Returns the value of attribute exit_status
6 7 8 |
# File 'lib/hermetic/result.rb', line 6 def exit_status @exit_status end |
#stderr ⇒ Object
Returns the value of attribute stderr
6 7 8 |
# File 'lib/hermetic/result.rb', line 6 def stderr @stderr end |
#stdout ⇒ Object
Returns the value of attribute stdout
6 7 8 |
# File 'lib/hermetic/result.rb', line 6 def stdout @stdout end |
#timed_out ⇒ Object
Returns the value of attribute timed_out
6 7 8 |
# File 'lib/hermetic/result.rb', line 6 def timed_out @timed_out end |
#trust ⇒ Object
Returns the value of attribute trust
6 7 8 |
# File 'lib/hermetic/result.rb', line 6 def trust @trust end |
Instance Method Details
#success? ⇒ Boolean
11 |
# File 'lib/hermetic/result.rb', line 11 def success? = exit_status.to_i.zero? && !timed_out |
#timed_out? ⇒ Boolean
13 |
# File 'lib/hermetic/result.rb', line 13 def timed_out? = !!timed_out |