Class: JenkinsCron::Job::Command
- Inherits:
-
Object
- Object
- JenkinsCron::Job::Command
- Defined in:
- lib/jenkins_cron/job/command.rb
Instance Method Summary collapse
-
#initialize(command, opts = {}) ⇒ Command
constructor
A new instance of Command.
- #shell_command ⇒ Object
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_command ⇒ Object
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 |