Sha256: c98da30878784095e4d17a68b8ff1d05d6ceff358b96fa86241b1e8e6e353a53

Contents?: true

Size: 450 Bytes

Versions: 84

Compression:

Stored size: 450 Bytes

Contents

class Gem::StringSink
  def initialize
    @string = ""
  end

  attr_reader :string

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

  def set_encoding(enc)
    @string.force_encoding enc
  end
end

class Gem::StringSource
  def initialize(str)
    @string = str.dup
  end

  def read(count=nil)
    if count
      @string.slice!(0,count)
    else
      s = @string
      @string = ""
      s
    end
  end

  alias_method :readpartial, :read
end

Version data entries

84 entries across 56 versions & 4 rubygems

Version Path
second_step-0.1.2 secondstep-notify-1.0.0-osx/lib/ruby/lib/ruby/gems/2.2.0/gems/second_step-0.1.1/secondstep-notify-1.0.0-osx/lib/ruby/lib/ruby/2.2.0/rubygems/util/stringio.rb
second_step-0.1.2 secondstep-notify-1.0.0-osx/lib/ruby/lib/ruby/2.2.0/rubygems/util/stringio.rb
rb2exe-0.1.60 bin/traveling-ruby-2.2.2/osx/lib/ruby/2.2.0/rubygems/util/stringio.rb
rb2exe-0.1.60 bin/traveling-ruby-2.2.2/l32/lib/ruby/2.2.0/rubygems/util/stringio.rb
rb2exe-0.1.60 bin/traveling-ruby-2.2.2/l64/lib/ruby/2.2.0/rubygems/util/stringio.rb
rb2exe-0.1.60 bin/traveling-ruby-2.2.2/win/lib/ruby/2.2.0/rubygems/util/stringio.rb
rb2exe-0.1.58 bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/util/stringio.rb
rb2exe-0.1.57 bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/util/stringio.rb
rb2exe-0.1.56 bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/util/stringio.rb
rb2exe-0.1.55 bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/util/stringio.rb
rb2exe-0.1.54 bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/util/stringio.rb
rb2exe-0.1.53 bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/util/stringio.rb
rb2exe-0.1.52 bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/util/stringio.rb
rb2exe-0.1.51 bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/util/stringio.rb
rb2exe-0.1.50 bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/util/stringio.rb
rb2exe-0.1.49 bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/util/stringio.rb
rb2exe-0.1.47 bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/util/stringio.rb
rb2exe-0.1.46 bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/util/stringio.rb
rb2exe-0.1.45 bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/util/stringio.rb
rb2exe-0.1.44 bin/traveling-ruby-2.2.2/lib/ruby/2.2.0/rubygems/util/stringio.rb