class Object
Public Instance Methods
silent_block() { || ... }
click to toggle source
# File lib/tfw.rb, line 126 def silent_block stderr, stdout = [STDERR, STDOUT].map(&:clone) [STDERR, STDOUT].each { |e| e.reopen File.new('/dev/null', 'w') } begin yield ensure { STDERR => stderr, STDOUT => stdout }.each { |k, v| k.reopen v } end end
tfw_load_module(&block)
click to toggle source
# File lib/tfw.rb, line 136 def tfw_load_module(&block) TFW.load_module(self, &block) end