Sha256: 00e18adea87794ac762a44f5ab564b6ca88ed5342ac6ff5a18d7f6f523ffa640
Contents?: true
Size: 439 Bytes
Versions: 4
Compression:
Stored size: 439 Bytes
Contents
module Auger class Test attr_accessor :name, :block 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 $! end Auger::Result.new(self, outcome) end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
auger-1.2.4 | lib/auger/test.rb |
auger-1.2.3 | lib/auger/test.rb |
auger-1.2.2 | lib/auger/test.rb |
auger-1.2.0 | lib/auger/test.rb |