IO wrapper that allows writing a limited amount of data
Writes data onto the IO, raising a FileOverflow exception if the number of bytes will be more than #
# File lib/rubygems/package/tar_writer.rb, line 42
42: def write(data)
43: if data.size + @written > @limit
44: raise FileOverflow, "You tried to feed more data than fits in the file."
45: end
46: @io.write data
47: @written += data.size
48: data.size
49: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.