Class: Semaph::Shells::Pipeline::JobLogCommand

Inherits:
Object
  • Object
show all
Defined in:
lib/semaph/shells/pipeline/job_log_command.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#helpObject (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_collectionObject (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

#usageObject (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