class Gem::StringSource

Public Class Methods

new(str) click to toggle source
# File lib/rubygems/util/stringio.rb, line 19
def initialize(str)
  @string = str.dup
end

Public Instance Methods

read(count=nil) click to toggle source
# File lib/rubygems/util/stringio.rb, line 23
def read(count=nil)
  if count
    @string.slice!(0,count)
  else
    s = @string
    @string = ""
    s
  end
end
Also aliased as: readpartial
readpartial(count=nil)
Alias for: read