Sha256: 69a821a69082a00ec4782eda09f6789c7202005e6d8fecfa795d43c44bc15b78

Contents?: true

Size: 546 Bytes

Versions: 1

Compression:

Stored size: 546 Bytes

Contents

module Kernel

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

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
stack_tracy-0.1.4 lib/stack_tracy/core_ext/kernel.rb