Class: Script
- Inherits:
-
Object
- Object
- Script
- Defined in:
- lib/spinjector/entity/script.rb
Instance Attribute Summary collapse
-
#dependency_file ⇒ Object
readonly
Returns the value of attribute dependency_file.
-
#execution_position ⇒ Object
readonly
Returns the value of attribute execution_position.
-
#input_file_list_paths ⇒ Object
readonly
Returns the value of attribute input_file_list_paths.
-
#input_paths ⇒ Object
readonly
Returns the value of attribute input_paths.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#output_file_list_paths ⇒ Object
readonly
Returns the value of attribute output_file_list_paths.
-
#output_paths ⇒ Object
readonly
Returns the value of attribute output_paths.
-
#shell_path ⇒ Object
readonly
Returns the value of attribute shell_path.
-
#show_env_vars_in_log ⇒ Object
readonly
Returns the value of attribute show_env_vars_in_log.
-
#source_code ⇒ Object
readonly
Returns the value of attribute source_code.
Instance Method Summary collapse
-
#initialize(name, source_code, shell_path, input_paths, output_paths, input_file_list_paths, output_file_list_paths, dependency_file, execution_position, show_env_vars_in_log) ⇒ Script
constructor
A new instance of Script.
- #verify ⇒ Object
- #verify_execution_position ⇒ Object
Constructor Details
#initialize(name, source_code, shell_path, input_paths, output_paths, input_file_list_paths, output_file_list_paths, dependency_file, execution_position, show_env_vars_in_log) ⇒ Script
Returns a new instance of Script.
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/spinjector/entity/script.rb', line 6 def initialize( name, source_code, shell_path, input_paths, output_paths, input_file_list_paths, output_file_list_paths, dependency_file, execution_position, show_env_vars_in_log ) @name = name @source_code = source_code @shell_path = shell_path @input_paths = input_paths @output_paths = output_paths @input_file_list_paths = input_file_list_paths @output_file_list_paths = output_file_list_paths @dependency_file = dependency_file @execution_position = execution_position @show_env_vars_in_log = show_env_vars_in_log verify() end |
Instance Attribute Details
#dependency_file ⇒ Object (readonly)
Returns the value of attribute dependency_file.
4 5 6 |
# File 'lib/spinjector/entity/script.rb', line 4 def dependency_file @dependency_file end |
#execution_position ⇒ Object (readonly)
Returns the value of attribute execution_position.
4 5 6 |
# File 'lib/spinjector/entity/script.rb', line 4 def execution_position @execution_position end |
#input_file_list_paths ⇒ Object (readonly)
Returns the value of attribute input_file_list_paths.
4 5 6 |
# File 'lib/spinjector/entity/script.rb', line 4 def input_file_list_paths @input_file_list_paths end |
#input_paths ⇒ Object (readonly)
Returns the value of attribute input_paths.
4 5 6 |
# File 'lib/spinjector/entity/script.rb', line 4 def input_paths @input_paths end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/spinjector/entity/script.rb', line 4 def name @name end |
#output_file_list_paths ⇒ Object (readonly)
Returns the value of attribute output_file_list_paths.
4 5 6 |
# File 'lib/spinjector/entity/script.rb', line 4 def output_file_list_paths @output_file_list_paths end |
#output_paths ⇒ Object (readonly)
Returns the value of attribute output_paths.
4 5 6 |
# File 'lib/spinjector/entity/script.rb', line 4 def output_paths @output_paths end |
#shell_path ⇒ Object (readonly)
Returns the value of attribute shell_path.
4 5 6 |
# File 'lib/spinjector/entity/script.rb', line 4 def shell_path @shell_path end |
#show_env_vars_in_log ⇒ Object (readonly)
Returns the value of attribute show_env_vars_in_log.
4 5 6 |
# File 'lib/spinjector/entity/script.rb', line 4 def show_env_vars_in_log @show_env_vars_in_log end |
#source_code ⇒ Object (readonly)
Returns the value of attribute source_code.
4 5 6 |
# File 'lib/spinjector/entity/script.rb', line 4 def source_code @source_code end |
Instance Method Details
#verify ⇒ Object
31 32 33 |
# File 'lib/spinjector/entity/script.rb', line 31 def verify verify_execution_position() end |
#verify_execution_position ⇒ Object
35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/spinjector/entity/script.rb', line 35 def verify_execution_position case execution_position when :before_compile, :before_headers true when :after_compile, :after_headers false when :after_all, false else raise ArgumentError, "Unknown execution position `#{execution_position}`" end end |