Day 19. Some Advanced Topics (That Aren't So Hard)

I'd discovered, after a lot of extreme apprehension about what spoons to use, that if you do something incorrect at table with a certain arrogance, as if you knew perfectly well you were doing it properly, you can get away with it…

—Sylvia Plath, The Bell Jar

Today we rush into the realm of network services, where angels fear to tread.

You've already seen objects of the IO class and its descendants; they're just all those things that can be read from and written to. Once we have opened an IO object, whatever it is, communication works through a consistent and familiar interface: read/write, gets/puts/print, each/each_line, and so on.

Until now all the IO objects we've encountered have been local: ...

Get Sams Teach Yourself Ruby in 21 Days now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.