On this page
class SyntaxSuggest::MiniStringIO
Acts like a StringIO
with reduced API, but without having to require that class.
Attributes
isatty[R]
string[R]
Public Class Methods
# File lib/syntax_suggest/core_ext.rb, line 11
def initialize(isatty: $stderr.isatty)
@string = +""
@isatty = isatty
end
Public Instance Methods
# File lib/syntax_suggest/core_ext.rb, line 17
def puts(value = $/, **)
@string << value
end
Ruby Core © 1993–2022 Yukihiro Matsumoto
Licensed under the Ruby License.
Ruby Standard Library © contributors
Licensed under their own licenses.