Sha256: 0b0728de1846b4425f1812a9e5954a3a0eadaa565d7a80dc1686a8ce6b933caf

Contents?: true

Size: 547 Bytes

Versions: 4

Compression:

Stored size: 547 Bytes

Contents

require "busted/counter"
require "busted/countable"
require "busted/tracer"
require "busted/traceable"

module Busted
  module Profiler
    extend self

    autoload :Default, "busted/profiler/default"
    autoload :Sandwich, "busted/profiler/sandwich"

    def run(options, &block)
      klass(options.fetch :profiler, :default).run(options, &block)
    end

    private

    def klass(profiler)
      Profiler.const_get profiler.capitalize
    rescue NameError
      fail ArgumentError, "profiler `#{profiler}' does not exist"
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
busted-0.2.3 lib/busted/profiler.rb
busted-0.2.2 lib/busted/profiler.rb
busted-0.2.1 lib/busted/profiler.rb
busted-0.2.0 lib/busted/profiler.rb