method
notify
notify(*opts, &block)
public
Hide source
# File lib/shell.rb, line 265 def self.notify(*opts, &block) Shell::debug_output_synchronize do if opts[-1].kind_of?(String) yorn = verbose? else yorn = opts.pop end return unless yorn if @debug_display_thread_id if @debug_display_process_id prefix = "shell(##{Process.pid}:#{Thread.current.to_s.sub("Thread", "Th")}): " else prefix = "shell(#{Thread.current.to_s.sub("Thread", "Th")}): " end else prefix = "shell: " end _head = true STDERR.print opts.collect{|mes| mes = mes.dup yield mes if iterator? if _head _head = false # "shell" " + mes prefix + mes else " "* prefix.size + mes end }.join("\n")+"\n" end end