Sha256: 3deca96904fb1a2f53a461ebade18bcffe8153fd8ef053443ed8cd07839a0caa
Contents?: true
Size: 960 Bytes
Versions: 3
Compression:
Stored size: 960 Bytes
Contents
require_relative "builtin" require_relative "expect" require_relative "getset" require_relative "run" module CheckDSL def log(text = "", type = :info) @stats[:logs] += 1 prefix = (type == :info) ? "" : "#{type.to_s.upcase}: " Logger.info " log #{prefix}" + text.to_s end def readme(text) @stats[:readmes] += 1 Logger.info " readme #{text}" end def target(desc, args = {}) if @target_begin Logger.warn "WARN Previous 'target' requires 'expect'" end @target_begin = true @stats[:targets] += 1 @targetid += 1 weight = args[:weight] ? args[:weight].to_f : 1.0 Logger.info format("(%03<targetid>d) target %<desc>s", targetid: @targetid, desc: desc) Logger.info " weight #{weight}" end alias_method :goal, :target def unique(key, _value) @stats[:uniques] += 1 Logger.info " unique value for <#{key}>" Logger.info "" end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
teuton-2.9.2 | lib/teuton/check/dsl/all.rb |
teuton-2.9.1 | lib/teuton/check/dsl/all.rb |
teuton-2.9.0 | lib/teuton/check/dsl/all.rb |