Sha256: 76a3f12e01d093b5fa35e0cfb92544827e7c37e3025be7de6e9ecd6645c17f5d

Contents?: true

Size: 490 Bytes

Versions: 16

Compression:

Stored size: 490 Bytes

Contents

# TODO: Remove if we don't want this in production?
def pdb(thing = nil, backtrace_offset: 0, **keywords)
  backtrace_line = caller[backtrace_offset].split(':')[0..1].join(':')
  thing = keywords if thing.eql?(nil) && keywords.any?
  thing = thing.inspect unless thing.is_a?(String)

  puts(
    (
      'PDB' + ': ' + thing
    ).colorize(color: :black, background: :light_white) +
      " @ #{backtrace_line}".colorize(color: :blue, background: :light_white)

  )
  puts "\n"
  thing
end

Version data entries

16 entries across 16 versions & 2 rubygems

Version Path
simply_serializable-1.5.1 lib/simply_serializable/debug.rb
simply_serializable-1.5.0 lib/simply_serializable/debug.rb
simply_serializable-1.4.2 lib/simply_serializable/debug.rb
simply_serializable-1.4.1 lib/simply_serializable/debug.rb
simply_serializable-1.4.0 lib/simply_serializable/debug.rb
simply_serializable-1.3.0 lib/simply_serializable/debug.rb
simply_serializable-1.2.2 lib/simply_serializable/debug.rb
simply_serializable-1.2.1 lib/simply_serializable/debug.rb
simply_serializable-1.2.0 lib/simply_serializable/debug.rb
simply_serializable-1.1.0 lib/simply_serializable/debug.rb
simply_serializable-1.0.0 lib/simply_serializable/debug.rb
fingerprintable-1.2.1 lib/fingerprintable/debug.rb
fingerprintable-1.2.0 lib/fingerprintable/debug.rb
fingerprintable-1.1.1 lib/fingerprintable/debug.rb
fingerprintable-1.1.0 lib/fingerprintable/debug.rb
fingerprintable-1.0.0 lib/fingerprintable/debug.rb