Class: Hermetic::Backends::Null
- Defined in:
- lib/hermetic/backends/null.rb
Overview
Disabled: code execution is off. Fails loud on run — a silent no-op would look like a sandbox while providing none.
Constant Summary
Constants inherited from Base
Base::OFF_HOST_TRUST, Base::TIMEOUT_EXIT
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
- #enabled? ⇒ Boolean
-
#initialize ⇒ Null
constructor
A new instance of Null.
- #run ⇒ Object
Methods inherited from Base
Constructor Details
#initialize ⇒ Null
Returns a new instance of Null.
6 7 8 |
# File 'lib/hermetic/backends/null.rb', line 6 def initialize super(trust: :none) end |
Instance Method Details
#enabled? ⇒ Boolean
10 |
# File 'lib/hermetic/backends/null.rb', line 10 def enabled? = false |
#run ⇒ Object
12 13 14 15 16 |
# File 'lib/hermetic/backends/null.rb', line 12 def run(*, **) raise DisabledError, "code execution is disabled (Null backend) — construct a real one: " \ "Hermetic.hosted / .gvisor / .firecracker / .docker" end |