Class: JenkinsCron::Job::Command

Inherits:
Object
  • Object
show all
Defined in:
lib/jenkins_cron/job/command.rb

Instance Method Summary collapse

Constructor Details

#initialize(command, opts = {}) ⇒ Command

Returns a new instance of Command.



2
3
4
5
# File 'lib/jenkins_cron/job/command.rb', line 2

def initialize(command, opts = {})
  @command = command
  @opts    = opts
end

Instance Method Details

#shell_commandObject



7
8
9
10
# File 'lib/jenkins_cron/job/command.rb', line 7

def shell_command
  script  = export_env
  script += "#{sh} -c '#{command}'\n"
end