Sha256: f956ee8b928201f63bb9e7d32e6ecb4d176fdef65191741b7172ba7a455bd8d9

Contents?: true

Size: 449 Bytes

Versions: 4

Compression:

Stored size: 449 Bytes

Contents

module Kernel

  def stack_tracy(arg = nil, options = {})
    if arg.is_a?(Hash)
      options = arg
      arg = nil
    end
    StackTracy.start options
    yield
    StackTracy.stop
    if arg == :print
      StackTracy.print
    elsif arg == :dump
      StackTracy.dump
    elsif arg == :open
      file = StackTracy.dump Dir::tmpdir
      StackTracy.open file, true
    elsif arg.is_a? String
      StackTracy.dump arg
    end
    nil
  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
stack_tracy-0.1.3 lib/stack_tracy/core_ext/kernel.rb
stack_tracy-0.1.2 lib/stack_tracy/core_ext/kernel.rb
stack_tracy-0.1.1 lib/stack_tracy/core_ext/kernel.rb
stack_tracy-0.1.0 lib/stack_tracy/core_ext/kernel.rb