class Patriot::Command::ShCommand
a command which executes shell scripts
Example pbc¶ ↑
sh { name "test" commands "echo '#{_date_}' > /tmp/test.out" }
Public Instance Methods
configure()
click to toggle source
@see Patriot::Command::Base#configure
# File lib/patriot/command/sh_command.rb, line 36 def configure @name_suffix ||= _date_ return self end
description()
click to toggle source
@see Patriot::Command::Base#description
# File lib/patriot/command/sh_command.rb, line 42 def description return @commands.join(@connector) end
execute()
click to toggle source
@see Patriot::Command::Base#execute
# File lib/patriot/command/sh_command.rb, line 47 def execute @logger.info "start shell command " @commands.each do |c| execute_command(c) end @logger.info "end shell command " end
job_id()
click to toggle source
@see Patriot::Command::Base#job_id
# File lib/patriot/command/sh_command.rb, line 31 def job_id return "#{command_name}_#{@name}_#{@name_suffix}" end