Sha256: 1e165a3f488ecb087f1857b0f7180ad5ea60a42c65db5183424851374c64c507

Contents?: true

Size: 752 Bytes

Versions: 2

Compression:

Stored size: 752 Bytes

Contents

module Rgot
  require 'rgot/version'
  require 'rgot/common'
  require 'rgot/m'
  require 'rgot/t'
  require 'rgot/b'
  require 'rgot/pb'
  require 'rgot/benchmark_result'
  require 'rgot/example_parser'

  OptionError = Class.new(StandardError)
  InternalTest = Struct.new(:module, :name)
  InternalBenchmark = Struct.new(:module, :name)
  InternalExample = Struct.new(:module, :name)
  ExampleOutput = Struct.new(:name, :output)

  class << self
    def now
      Process.clock_gettime(Process::CLOCK_MONOTONIC)
    end

    def benchmark(opts_hash = {}, &block)
      opts = B::Options.new
      opts_hash.each do |k, v|
        opts[k] = v
      end
      B.new(nil, nil, opts).run(&block)
    end

    def verbose?
      @chatty
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rgot-1.1.0 lib/rgot.rb
rgot-0.2.0 lib/rgot.rb