Sha256: 87e3c7d499b40cf2783acea53ad02cad3f43d2de21768d4959ff9cebdb2af44f
Contents?: true
Size: 534 Bytes
Versions: 15
Compression:
Stored size: 534 Bytes
Contents
module Auger class Test attr_accessor :name, :block, :id def initialize(name, block) @name = name @block = block end ## return Auger::Result object with outcome of test def run(response) outcome = if response.is_a?(Exception) or @block.nil? response else @block.call(response) rescue $! # run the test end result = outcome.is_a?(Result) ? outcome : Auger::Result.new(outcome) result.test = self result end end end
Version data entries
15 entries across 15 versions & 1 rubygems