Class: Semaph::Shells::Pipeline::JobLogCommand
- Inherits:
-
Object
- Object
- Semaph::Shells::Pipeline::JobLogCommand
- Defined in:
- lib/semaph/shells/pipeline/job_log_command.rb
Instance Attribute Summary collapse
-
#help ⇒ Object
readonly
Returns the value of attribute help.
-
#job_collection ⇒ Object
readonly
Returns the value of attribute job_collection.
-
#usage ⇒ Object
readonly
Returns the value of attribute usage.
Instance Method Summary collapse
- #execute(index_string) ⇒ Object
-
#initialize(job_collection) ⇒ JobLogCommand
constructor
A new instance of JobLogCommand.
Constructor Details
#initialize(job_collection) ⇒ JobLogCommand
Returns a new instance of JobLogCommand.
9 10 11 12 13 |
# File 'lib/semaph/shells/pipeline/job_log_command.rb', line 9 def initialize(job_collection) @job_collection = job_collection @usage = "<job index>" @help = "retrieve log for job" end |
Instance Attribute Details
#help ⇒ Object (readonly)
Returns the value of attribute help.
7 8 9 |
# File 'lib/semaph/shells/pipeline/job_log_command.rb', line 7 def help @help end |
#job_collection ⇒ Object (readonly)
Returns the value of attribute job_collection.
7 8 9 |
# File 'lib/semaph/shells/pipeline/job_log_command.rb', line 7 def job_collection @job_collection end |
#usage ⇒ Object (readonly)
Returns the value of attribute usage.
7 8 9 |
# File 'lib/semaph/shells/pipeline/job_log_command.rb', line 7 def usage @usage end |
Instance Method Details
#execute(index_string) ⇒ Object
15 16 17 |
# File 'lib/semaph/shells/pipeline/job_log_command.rb', line 15 def execute(index_string) with_job(index_string) { |job| system(command(job)) } end |