123456789_123456789_123456789_123456789_123456789_

Class: Gem::StringSink

Relationships & Source Files
Inherits: Object
Defined in: lib/rubygems/util/stringio.rb

Class Method Summary

Instance Attribute Summary

Instance Method Summary

Constructor Details

.newStringSink

[ GitHub ]

  
# File 'lib/rubygems/util/stringio.rb', line 2

def initialize
  @string = ""
end

Instance Attribute Details

#string (readonly)

[ GitHub ]

  
# File 'lib/rubygems/util/stringio.rb', line 6

attr_reader :string

Instance Method Details

#set_encoding(enc)

[ GitHub ]

  
# File 'lib/rubygems/util/stringio.rb', line 13

def set_encoding(enc)
  @string.force_encoding enc
end

#write(s)

[ GitHub ]

  
# File 'lib/rubygems/util/stringio.rb', line 8

def write(s)
  @string += s
  s.size
end