Sha256: 65d316ed04085c0be7b2c9da5bf7bc4c1d1f5bdfcc0d89a93a0b7fa76e4e208b

Contents?: true

Size: 578 Bytes

Versions: 4

Compression:

Stored size: 578 Bytes

Contents

require_relative "linepipe/version"
require_relative "linepipe/process"

module Linepipe
  class << self

    def develop(&block)
      build_process(block) { |process| process.develop }
    end

    def run(&block)
      build_process(block) { |process| process.run }
    end

    def benchmark(iterations, &block)
      build_process(block) { |process| process.benchmark(iterations) }
    end


    private

    def build_process(dsl_block, &block)
      Process.new.tap do |process|
        process.instance_eval(&dsl_block)
        yield process
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
linepipe-0.2.0 lib/linepipe.rb
linepipe-0.1.2 lib/linepipe.rb
linepipe-0.1.1 lib/linepipe.rb
linepipe-0.1.0 lib/linepipe.rb