Sha256: 8711f3a17d3165132937d1ab2607d598ac14ee6fa7c17a6455035cd3f6f8c2b1
Contents?: true
Size: 467 Bytes
Versions: 3
Compression:
Stored size: 467 Bytes
Contents
module Asciidoctor module Debug @show_debug = nil def self.debug puts yield if self.show_debug_output? end def self.set_debug(value) @show_debug = value end def self.show_debug_output? @show_debug || (ENV['DEBUG'] == 'true' && ENV['SUPPRESS_DEBUG'] != 'true') end def self.puts_indented(level, *args) indentation = " " * level * 2 args.each do |arg| self.debug { "#{indentation}#{arg}" } end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
asciidoctor-0.1.3 | lib/asciidoctor/debug.rb |
asciidoctor-0.1.2 | lib/asciidoctor/debug.rb |
asciidoctor-0.1.1 | lib/asciidoctor/debug.rb |