Class: Google::Apis::BatchV1::Script
- Inherits:
-
Object
- Object
- Google::Apis::BatchV1::Script
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/batch_v1/classes.rb,
lib/google/apis/batch_v1/representations.rb,
lib/google/apis/batch_v1/representations.rb
Overview
Script runnable.
Instance Attribute Summary collapse
-
#path ⇒ String
The path to a script file that is accessible from the host VM(s).
-
#text ⇒ String
The text for a script.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Script
constructor
A new instance of Script.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Script
Returns a new instance of Script.
2202 2203 2204 |
# File 'lib/google/apis/batch_v1/classes.rb', line 2202 def initialize(**args) update!(**args) end |
Instance Attribute Details
#path ⇒ String
The path to a script file that is accessible from the host VM(s). Unless the
script file supports the default #!/bin/sh
shell interpreter, you must
specify an interpreter by including a [shebang line](https://en.wikipedia.org/
wiki/Shebang_(Unix) as the first line of the file. For example, to execute the
script using bash, include #!/bin/bash
as the first line of the file.
Alternatively, to execute the script using Python3, include #!/usr/bin/env
python3
as the first line of the file.
Corresponds to the JSON property path
2190 2191 2192 |
# File 'lib/google/apis/batch_v1/classes.rb', line 2190 def path @path end |
#text ⇒ String
The text for a script. Unless the script text supports the default #!/bin/sh
shell interpreter, you must specify an interpreter by including a [shebang
line](https://en.wikipedia.org/wiki/Shebang_(Unix) at the beginning of the
text. For example, to execute the script using bash, include #!/bin/bash\n
at the beginning of the text. Alternatively, to execute the script using
Python3, include #!/usr/bin/env python3\n
at the beginning of the text.
Corresponds to the JSON property text
2200 2201 2202 |
# File 'lib/google/apis/batch_v1/classes.rb', line 2200 def text @text end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
2207 2208 2209 2210 |
# File 'lib/google/apis/batch_v1/classes.rb', line 2207 def update!(**args) @path = args[:path] if args.key?(:path) @text = args[:text] if args.key?(:text) end |