Sha256: 2634974d1470fa110a59f83fb8c153691a679dd0f6968f6d045f9486934baf5c

Contents?: true

Size: 406 Bytes

Versions: 3

Compression:

Stored size: 406 Bytes

Contents

module Asciidoctor
  def self.debug(*args)
    puts *args 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)
    thing = " "*level*2
    args.each do |arg|
      self.debug "#{thing}#{arg}"
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
asciidoctor-0.0.7 lib/asciidoctor/debug.rb
asciidoctor-0.0.6 lib/asciidoctor/debug.rb
asciidoctor-0.0.5 lib/asciidoctor/debug.rb