Class: Program
- Inherits:
-
Object
- Object
- Program
- Defined in:
- lib/autoflow/program.rb
Instance Attribute Summary collapse
-
#attrib ⇒ Object
Returns the value of attribute attrib.
-
#batch ⇒ Object
Returns the value of attribute batch.
-
#dependencies ⇒ Object
Returns the value of attribute dependencies.
-
#initialization ⇒ Object
Returns the value of attribute initialization.
-
#name ⇒ Object
Returns the value of attribute name.
-
#parameters ⇒ Object
Returns the value of attribute parameters.
-
#queue_id ⇒ Object
Returns the value of attribute queue_id.
Instance Method Summary collapse
-
#initialize(name, initialization, parameters, dependencies, job_attrib) ⇒ Program
constructor
A new instance of Program.
- #inspect ⇒ Object
Constructor Details
#initialize(name, initialization, parameters, dependencies, job_attrib) ⇒ Program
Returns a new instance of Program.
4 5 6 7 8 9 10 11 12 |
# File 'lib/autoflow/program.rb', line 4 def initialize(name, initialization, parameters, dependencies, job_attrib) @name = name @initialization = initialization @parameters = parameters @dependencies = dependencies @attrib = job_attrib @queue_id = nil @batch = nil end |
Instance Attribute Details
#attrib ⇒ Object
Returns the value of attribute attrib.
2 3 4 |
# File 'lib/autoflow/program.rb', line 2 def attrib @attrib end |
#batch ⇒ Object
Returns the value of attribute batch.
2 3 4 |
# File 'lib/autoflow/program.rb', line 2 def batch @batch end |
#dependencies ⇒ Object
Returns the value of attribute dependencies.
2 3 4 |
# File 'lib/autoflow/program.rb', line 2 def dependencies @dependencies end |
#initialization ⇒ Object
Returns the value of attribute initialization.
2 3 4 |
# File 'lib/autoflow/program.rb', line 2 def initialization @initialization end |
#name ⇒ Object
Returns the value of attribute name.
2 3 4 |
# File 'lib/autoflow/program.rb', line 2 def name @name end |
#parameters ⇒ Object
Returns the value of attribute parameters.
2 3 4 |
# File 'lib/autoflow/program.rb', line 2 def parameters @parameters end |
#queue_id ⇒ Object
Returns the value of attribute queue_id.
2 3 4 |
# File 'lib/autoflow/program.rb', line 2 def queue_id @queue_id end |
Instance Method Details
#inspect ⇒ Object
14 15 16 17 18 19 20 21 22 23 |
# File 'lib/autoflow/program.rb', line 14 def inspect if @parameters.class.to_s == 'String' program = @parameters.split(' ').first command = @parameters.gsub("\n","\n\t") else program = 'iterative_job' command = @parameters.map{|b| b}.join(' ') end string="\e[31m#{program}\n\e[0m\t\e[33m#{command}\e[0m\e[34m#{@attrib[:exec_folder]}\e[0m" end |