Class: Larrow::Runner::Manifest::Script
- Inherits:
-
Object
- Object
- Larrow::Runner::Manifest::Script
- Defined in:
- lib/larrow/runner/manifest/configuration.rb
Overview
store the real command line
:cannt_fail used to declare `non-zero retcode of current script will be fail`
Instance Attribute Summary collapse
-
#args ⇒ Object
Returns the value of attribute args.
-
#base_dir ⇒ Object
Returns the value of attribute base_dir.
-
#cannt_fail ⇒ Object
Returns the value of attribute cannt_fail.
-
#cmd ⇒ Object
Returns the value of attribute cmd.
Instance Method Summary collapse
- #actual_command ⇒ Object
- #dump ⇒ Object
-
#initialize(cmd, base_dir: nil, args: {}, cannt_fail: true) ⇒ Script
constructor
A new instance of Script.
Constructor Details
#initialize(cmd, base_dir: nil, args: {}, cannt_fail: true) ⇒ Script
Returns a new instance of Script.
114 115 116 117 118 119 |
# File 'lib/larrow/runner/manifest/configuration.rb', line 114 def initialize cmd, base_dir:nil, args:{}, cannt_fail: true self.cmd = cmd self.args = args self.cannt_fail = cannt_fail self.base_dir = base_dir end |
Instance Attribute Details
#args ⇒ Object
Returns the value of attribute args.
113 114 115 |
# File 'lib/larrow/runner/manifest/configuration.rb', line 113 def args @args end |
#base_dir ⇒ Object
Returns the value of attribute base_dir.
113 114 115 |
# File 'lib/larrow/runner/manifest/configuration.rb', line 113 def base_dir @base_dir end |
#cannt_fail ⇒ Object
Returns the value of attribute cannt_fail.
113 114 115 |
# File 'lib/larrow/runner/manifest/configuration.rb', line 113 def cannt_fail @cannt_fail end |
#cmd ⇒ Object
Returns the value of attribute cmd.
113 114 115 |
# File 'lib/larrow/runner/manifest/configuration.rb', line 113 def cmd @cmd end |
Instance Method Details
#actual_command ⇒ Object
121 122 123 |
# File 'lib/larrow/runner/manifest/configuration.rb', line 121 def actual_command sprintf(cmd, args) end |
#dump ⇒ Object
125 126 127 128 |
# File 'lib/larrow/runner/manifest/configuration.rb', line 125 def dump return nil if cmd.empty? cmd end |