Sha256: ee46582b319f285300e0caf47cf20c4d1003a7cc18f537aebf501a7c5c5b3c62

Contents?: true

Size: 348 Bytes

Versions: 102

Compression:

Stored size: 348 Bytes

Contents

module Kernel

  #-----------------------------------------------------------------------------
  # Utilities

  def capture
    out     = StringIO.new
    $stdout = out
    
    error   = StringIO.new
    $stderr = error
    
    # Go do stuff!
    yield    
    return out, error
    
  ensure
    $stdout = STDOUT
    $stderr = STDERR
  end
end

Version data entries

102 entries across 102 versions & 6 rubygems

Version Path
corl-0.5.2 spec/corl_test_kernel.rb
nucleon-0.2.2 spec/coral_test_kernel.rb
corl-0.5.1 spec/corl_test_kernel.rb
nucleon-0.2.1 spec/coral_test_kernel.rb
corl-0.5.0 spec/corl_test_kernel.rb
nucleon-0.2.0 spec/coral_test_kernel.rb
corl-0.4.29 spec/corl_test_kernel.rb
nucleon-0.1.19 spec/coral_test_kernel.rb
corl-0.4.28 spec/corl_test_kernel.rb
corl-0.4.27 spec/corl_test_kernel.rb
nucleon-0.1.18 spec/coral_test_kernel.rb
corl-0.4.26 spec/corl_test_kernel.rb
corl-0.4.25 spec/corl_test_kernel.rb
corl-0.4.24 spec/corl_test_kernel.rb
corl-0.4.23 spec/corl_test_kernel.rb
nucleon-0.1.17 spec/coral_test_kernel.rb
nucleon-0.1.16 spec/coral_test_kernel.rb
corl-0.4.22 spec/corl_test_kernel.rb
corl-0.4.21 spec/corl_test_kernel.rb
corl-0.4.20 spec/corl_test_kernel.rb