Skip to content

Instantly share code, notes, and snippets.

@jacknoble
Last active October 4, 2020 04:01
Show Gist options
  • Save jacknoble/021c8118abeb8a740451247db110c31d to your computer and use it in GitHub Desktop.
Save jacknoble/021c8118abeb8a740451247db110c31d to your computer and use it in GitHub Desktop.
class IOSource
include Enumerable
def each
loop do
yield gets.chomp
end
end
end
IOSource.new.lazy.
map(&:upcase).
map { |e| puts e }.
force
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment