Sha256: 18bbcefa3d77047eba0a26f701cecaac12f0cd3ac665bd87ab0226ddd015ab46
Contents?: true
Size: 384 Bytes
Versions: 1
Compression:
Stored size: 384 Bytes
Contents
module Kamerling module CoreExtensions module Main module_function def req param method = caller.first[/`(.*)'$/, 1] callsite = is_a?(Class) ? "#{name}.#{method}" : "#{self.class}##{method}" fail "#{callsite}: param #{param} is required" end def warn_off verbose = $VERBOSE $VERBOSE = false yield ensure $VERBOSE = verbose end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
kamerling-0.0.2 | lib/kamerling/core_extensions/main.rb |