Methods
- N
- R
Class Public methods
new(str)
Link
Source: show
# File lib/rubygems/util/stringio.rb, line 19 def initialize(str) @string = str.dup end
Instance Public methods
read(count=nil)
Link
Also aliased as: readpartial
Source: show
# 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