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, and the temporary files it uses (for example a file list), which must exist until it ends.
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.
-
#temp_files ⇒ Object
Returns the value of attribute temp_files.
Instance Method Summary collapse
-
#deep_clone ⇒ ExecSpec
Deep copy with independent :args, :env and :temp_files.
-
#initialize(exec: nil, env: {}, args: [], temp_files: []) ⇒ ExecSpec
constructor
A new instance of ExecSpec.
Constructor Details
#initialize(exec: nil, env: {}, args: [], temp_files: []) ⇒ ExecSpec
Returns a new instance of ExecSpec.
10 |
# File 'lib/aspera/exec_spec.rb', line 10 def initialize(exec: nil, env: {}, args: [], temp_files: [], **) = super |
Instance Attribute Details
#args ⇒ Object
Returns the value of attribute args
9 10 11 |
# File 'lib/aspera/exec_spec.rb', line 9 def args @args end |
#env ⇒ Object
Returns the value of attribute env
9 10 11 |
# File 'lib/aspera/exec_spec.rb', line 9 def env @env end |
#exec ⇒ Object
Returns the value of attribute exec
9 10 11 |
# File 'lib/aspera/exec_spec.rb', line 9 def exec @exec end |
#temp_files ⇒ Object
Returns the value of attribute temp_files
9 10 11 |
# File 'lib/aspera/exec_spec.rb', line 9 def temp_files @temp_files end |
Instance Method Details
#deep_clone ⇒ ExecSpec
Returns deep copy with independent :args, :env and :temp_files.
13 14 15 |
# File 'lib/aspera/exec_spec.rb', line 13 def deep_clone self.class.new(exec: exec, env: env.dup, args: args.dup, temp_files: temp_files.dup) end |