Sha256: fdc590e9413f07ad88e6f78698f54072dc95c61fb972302c38cee07ee1bdf743

Contents?: true

Size: 321 Bytes

Versions: 2

Compression:

Stored size: 321 Bytes

Contents

$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
require 'sconb'

# this method is written by wycats
def capture(stream)
  begin
    stream = stream.to_s
    eval "$#{stream} = StringIO.new"
    yield
    result = eval("$#{stream}").string
  ensure
    eval("$#{stream} = #{stream.upcase}")
  end

  result
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
sconb-0.0.6 spec/spec_helper.rb
sconb-0.0.5 spec/spec_helper.rb