Class: Bedouin::Job
- Inherits:
-
Object
- Object
- Bedouin::Job
- Defined in:
- lib/bedouin/job.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#status ⇒ Object
Returns the value of attribute status.
-
#stderr ⇒ Object
Returns the value of attribute stderr.
-
#stdout ⇒ Object
Returns the value of attribute stdout.
Instance Method Summary collapse
- #file_path ⇒ Object
-
#initialize(environment, template) ⇒ Job
constructor
A new instance of Job.
- #to_s ⇒ Object
Constructor Details
#initialize(environment, template) ⇒ Job
Returns a new instance of Job.
7 8 9 10 11 |
# File 'lib/bedouin/job.rb', line 7 def initialize(environment,template) @name = (template.name + '_' + environment.name).freeze @environment = environment @template = template end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/bedouin/job.rb', line 5 def name @name end |
#status ⇒ Object
Returns the value of attribute status.
4 5 6 |
# File 'lib/bedouin/job.rb', line 4 def status @status end |
#stderr ⇒ Object
Returns the value of attribute stderr.
4 5 6 |
# File 'lib/bedouin/job.rb', line 4 def stderr @stderr end |
#stdout ⇒ Object
Returns the value of attribute stdout.
4 5 6 |
# File 'lib/bedouin/job.rb', line 4 def stdout @stdout end |
Instance Method Details
#file_path ⇒ Object
13 14 15 |
# File 'lib/bedouin/job.rb', line 13 def file_path tempfile.path end |
#to_s ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/bedouin/job.rb', line 17 def to_s [stdout, stderr].map do |output| output.each_line.map do |l| @name + ": " + l end end end |