Skip to content

End of Life Ruby 3.1 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →

instance method

PrettyPrint#text

text(obj, width=obj.length)

This adds obj as a text of width columns in width.

If width is not specified, obj.length is used.

See also #nest #group_sub also in 4.1 · 4.0 · 3.4 · 3.3 · 3.2 · 3.0