Sweet Lord!

  • Thread starter Daniel Schierbeck
  • Start date
D

Daniel Schierbeck

It looks even cooler like this:

class Terminal
class << self
include Enumerable

def each
while input = gets
yield input.chomp
end
end
end
end

Terminal.entries.join(', ')


Ahh, the possibilities!


Cheers,
Daniel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,781
Messages
2,569,619
Members
45,316
Latest member
naturesElixirCBDGummies

Latest Threads

Top