display

obj.display(port=$>) â nil
Instance Public methods

Prints obj on the given port (default $>). Equivalent to:

1
2
3
def display(port=$>)
  port.write self
end

For example:

1
2
3
4
1.display
"cat".display
[ 4, 5, 6 ].display
puts

produces:

1
1cat456
doc_ruby_on_rails
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.