| Class | TempIO |
| In: |
lib/rubygems/test_utilities.rb
|
| Parent: | Object |
A StringIO duck-typed class that uses Tempfile instead of String as the backing store.
# File lib/rubygems/test_utilities.rb, line 98
98: def initialize(string = '')
99: @tempfile = Tempfile.new "TempIO-#{@@count += 1}"
100: @tempfile.binmode
101: @tempfile.write string
102: @tempfile.rewind
103: end
# File lib/rubygems/test_utilities.rb, line 105
105: def method_missing(meth, *args, &block)
106: @tempfile.send(meth, *args, &block)
107: end