# File lib/asciidoctor/debug.rb, line 5 def self.debug warn yield if self.show_debug_output? end
# File lib/asciidoctor/debug.rb, line 17 def self.puts_indented(level, *args) indentation = " " * level * 2 args.each do |arg| self.debug { "#{indentation}#{arg}" } end end
# File lib/asciidoctor/debug.rb, line 9 def self.set_debug(value) @show_debug = value end
# File lib/asciidoctor/debug.rb, line 13 def self.show_debug_output? @show_debug || (ENV['DEBUG'] == 'true' && ENV['SUPPRESS_DEBUG'] != 'true') end