APIdock / Ruby
/
method

notify

ruby latest stable - Class: Shell
notify(*opts)
public

No documentation available.

# File lib/shell.rb, line 427
 def self.notify(*opts)
 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
 prefix + mes
 else
 " "* prefix.size + mes
 end
 }.join("\n")+"\n"
 end
 end

AltStyle によって変換されたページ (->オリジナル) /