Class: Aspera::ExecSpec
- Inherits:
-
Struct
- Object
- Struct
- Aspera::ExecSpec
- Defined in:
- lib/aspera/exec_spec.rb
Overview
Holds the executable name, environment variables and command line arguments for a spawned process.
Instance Attribute Summary collapse
-
#args ⇒ Object
Returns the value of attribute args.
-
#env ⇒ Object
Returns the value of attribute env.
-
#exec ⇒ Object
Returns the value of attribute exec.
Instance Method Summary collapse
-
#deep_clone ⇒ ExecSpec
Deep copy with independent :args and :env.
-
#initialize(exec: nil, env: {}, args: []) ⇒ ExecSpec
constructor
A new instance of ExecSpec.
Constructor Details
#initialize(exec: nil, env: {}, args: []) ⇒ ExecSpec
Returns a new instance of ExecSpec.
6 |
# File 'lib/aspera/exec_spec.rb', line 6 def initialize(exec: nil, env: {}, args: [], **) = super |
Instance Attribute Details
#args ⇒ Object
Returns the value of attribute args
5 6 7 |
# File 'lib/aspera/exec_spec.rb', line 5 def args @args end |
#env ⇒ Object
Returns the value of attribute env
5 6 7 |
# File 'lib/aspera/exec_spec.rb', line 5 def env @env end |
#exec ⇒ Object
Returns the value of attribute exec
5 6 7 |
# File 'lib/aspera/exec_spec.rb', line 5 def exec @exec end |
Instance Method Details
#deep_clone ⇒ ExecSpec
Returns deep copy with independent :args and :env.
9 10 11 |
# File 'lib/aspera/exec_spec.rb', line 9 def deep_clone self.class.new(exec: exec, env: env.dup, args: args.dup) end |