Class: Ask::Sandbox::Base
- Inherits:
-
Object
- Object
- Ask::Sandbox::Base
- Defined in:
- lib/ask/sandbox/base.rb
Overview
Abstract base class for all sandbox providers.
A sandbox provider is responsible for executing commands in an isolated environment. Subclasses implement #call which runs a command and returns an Result.
Direct Known Subclasses
Instance Method Summary collapse
-
#call(command, timeout: 30, workdir: nil, env: {}, stdin: nil) ⇒ Ask::Sandbox::Result
Execute a command in the sandbox.
Instance Method Details
#call(command, timeout: 30, workdir: nil, env: {}, stdin: nil) ⇒ Ask::Sandbox::Result
Execute a command in the sandbox.
61 62 63 |
# File 'lib/ask/sandbox/base.rb', line 61 def call(command, timeout: 30, workdir: nil, env: {}, stdin: nil) raise NotImplementedError, "#{self.class} must implement #call(command, ...)" end |