Method: Shell::SystemCommand#notify

Defined in:
lib/shell/system-command.rb

#notify(*opts, &block) ⇒ Object

ex)

  if you wish to output: 
   "shell: job(#{@command}:#{@pid}) close pipe-out."
then 
   mes: "job(%id) close pipe-out."
  yorn: Boolean(@shell.debug? or @shell.verbose?)


156
157
158
159
160
161
162
163
164
165
166
# File 'lib/shell/system-command.rb', line 156

def notify(*opts, &block)
  Thread.exclusive do
	@shell.notify(*opts) {|mes|
	  yield mes if iterator?

	  mes.gsub!("%id", "#{@command}:##{@pid}")
	  mes.gsub!("%name", "#{@command}")
	  mes.gsub!("%pid", "#{@pid}")
	}
  end
end